// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/gtk/private.h"
+#if wxUSE_COLOURPICKERCTRL && defined(__WXGTK24__)
+
#include "wx/clrpicker.h"
-#include <gdk/gdk.h>
#include <gtk/gtk.h>
-
-
// ============================================================================
// implementation
// ============================================================================
-#if wxUSE_COLOURPICKERCTRL && defined(__WXGTK24__)
-
//-----------------------------------------------------------------------------
// "color-set"
//-----------------------------------------------------------------------------
{
// 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());
{
if (!gtk_check_version(2,4,0))
{
- m_needParent = true;
-
if (!PreCreation( parent, pos, size ) ||
!wxControl::CreateBase(parent, id, pos, size, style, validator, name))
{
m_colour = col;
m_widget = gtk_color_button_new_with_color( m_colour.GetColor() );
- gtk_widget_show( GTK_WIDGET(m_widget) );
+ gtk_widget_show(m_widget);
// GtkColourButton signals
g_signal_connect(m_widget, "color-set",
m_parent->DoAddChild( this );
PostCreation(size);
- SetBestSize(size);
+ SetInitialSize(size);
}
else
return wxGenericColourButton::Create(parent, id, col, pos, size,