]> git.saurik.com Git - wxWidgets.git/commitdiff
Some themes round the edges of the buttons, overwriting any text that
authorRobin Dunn <robin@alldunn.com>
Thu, 11 Mar 2004 22:44:36 +0000 (22:44 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 11 Mar 2004 22:44:36 +0000 (22:44 +0000)
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

src/gtk/button.cpp
src/gtk1/button.cpp

index 68e6eb534685c637559cf496b319803030ad3ce8..a3f112390869fb1c1d7d009c5ae67c7f6fc22d69 100644 (file)
@@ -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;
index 68e6eb534685c637559cf496b319803030ad3ce8..a3f112390869fb1c1d7d009c5ae67c7f6fc22d69 100644 (file)
@@ -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;