X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4ce7b1e43fdf835a77a78765fe73de707b89e85f..559f60efa8e7c0735b2dca83bd80b56cd96cec3b:/src/gtk/clrpicker.cpp diff --git a/src/gtk/clrpicker.cpp b/src/gtk/clrpicker.cpp index 9b5cc89a47..a8ed5ef927 100644 --- a/src/gtk/clrpicker.cpp +++ b/src/gtk/clrpicker.cpp @@ -21,9 +21,6 @@ #include "wx/clrpicker.h" -#include "wx/gtk/private.h" - -#include #include // ============================================================================ @@ -40,7 +37,9 @@ static void gtk_clrbutton_setcolor_callback(GtkColorButton *widget, { // update the m_colour member of the wxColourButton wxASSERT(p); - gtk_color_button_get_color(widget, p->GetGdkColor()); + GdkColor gdkColor; + gtk_color_button_get_color(widget, &gdkColor); + p->SetGdkColor(gdkColor); // fire the colour-changed event wxColourPickerEvent event(p, p->GetId(), p->GetColour()); @@ -63,6 +62,7 @@ bool wxColourButton::Create( wxWindow *parent, wxWindowID id, if (!gtk_check_version(2,4,0)) { m_needParent = true; + m_acceptsFocus = true; if (!PreCreation( parent, pos, size ) || !wxControl::CreateBase(parent, id, pos, size, style, validator, name)) @@ -83,7 +83,7 @@ bool wxColourButton::Create( wxWindow *parent, wxWindowID id, m_parent->DoAddChild( this ); PostCreation(size); - SetBestSize(size); + SetInitialSize(size); } else return wxGenericColourButton::Create(parent, id, col, pos, size,