// we are not interested to the ID of our picker as we connect
// to its "changed" event dynamically...
- m_picker = new wxColourPickerWidget(this, wxID_ANY, col, wxPoint(40,0), wxSize(30,-1),
+ m_picker = new wxColourPickerWidget(this, wxID_ANY, col,
+ wxDefaultPosition, wxDefaultSize,
GetPickerStyle(style));
// complete sizer creation
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