]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/clrpickerg.cpp
Made wxBORDER_THEME the same as wxBORDER_DEFAULT
[wxWidgets.git] / src / generic / clrpickerg.cpp
index 497bfa0a017e38cf74f9026be5d5f61bdef93d4d..717b1811ae0700abe188fd2eedc487f06d30b7f7 100644 (file)
@@ -117,4 +117,16 @@ void wxGenericColourButton::UpdateColour()
         SetLabel(m_colour.GetAsString(wxC2S_HTML_SYNTAX));
 }
 
+wxSize wxGenericColourButton::DoGetBestSize() const
+{
+    wxSize sz(wxButton::DoGetBestSize());
+    if ( HasFlag(wxCLRP_SHOW_LABEL) )
+        return sz;
+
+    // if we have no label, then make this button a square
+    // (like e.g. native GTK version of this control)
+    sz.SetWidth(sz.GetHeight());
+    return sz;
+}
+
 #endif      // wxUSE_COLOURPICKERCTRL