From: Robin Dunn Date: Thu, 11 Mar 2004 22:44:36 +0000 (+0000) Subject: Some themes round the edges of the buttons, overwriting any text that X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/391ddf408d03e207c5446f3f0635a88fc4d96977 Some themes round the edges of the buttons, overwriting any text that goes all the way to the edges. Give the button a few extra pixels to work around that. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26182 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/button.cpp b/src/gtk/button.cpp index 68e6eb5346..a3f1123908 100644 --- a/src/gtk/button.cpp +++ b/src/gtk/button.cpp @@ -212,6 +212,10 @@ wxSize wxButton::DoGetBestSize() const { wxSize ret( wxControl::DoGetBestSize() ); +#ifndef __WXGTK20__ + ret.x += 10; // add a few pixels for sloppy (but common) themes +#endif + if (!HasFlag(wxBU_EXACTFIT)) { if (ret.x < 80) ret.x = 80; diff --git a/src/gtk1/button.cpp b/src/gtk1/button.cpp index 68e6eb5346..a3f1123908 100644 --- a/src/gtk1/button.cpp +++ b/src/gtk1/button.cpp @@ -212,6 +212,10 @@ wxSize wxButton::DoGetBestSize() const { wxSize ret( wxControl::DoGetBestSize() ); +#ifndef __WXGTK20__ + ret.x += 10; // add a few pixels for sloppy (but common) themes +#endif + if (!HasFlag(wxBU_EXACTFIT)) { if (ret.x < 80) ret.x = 80;