]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/button.cpp
don't set min width for the buttons
[wxWidgets.git] / src / univ / button.cpp
index 95d4ce4aee40b65e7ea17e67e9aa5674a88a686e..a6438e0d51c83d0131dff8925f3483cebf0b01de 100644 (file)
@@ -136,9 +136,12 @@ wxSize wxButton::DoGetBestClientSize() const
 
     // for compatibility with other ports, the buttons default size is never
     // less than the standard one
-    wxSize szDef = GetDefaultSize();
-    if ( width < szDef.x )
-        width = szDef.x;
+    if ( !(GetWindowStyle() & wxBU_EXACTFIT) )
+    {
+        wxSize szDef = GetDefaultSize();
+        if ( width < szDef.x )
+            width = szDef.x;
+    }
 
     return wxSize(width, height);
 }