button->GetEventHandler()->ProcessEvent(event);
}
+//-----------------------------------------------------------------------------
+// "style_set" from m_widget
+//-----------------------------------------------------------------------------
+
+static gint
+gtk_button_style_set_callback( GtkWidget *m_widget, GtkStyle *WXUNUSED(style), wxButton *win )
+{
+ if (g_isIdle)
+ wxapp_install_idle_handler();
+
+ if (GTK_WIDGET_REALIZED(m_widget))
+ win->SetSize( win->m_x, win->m_y, win->m_width, win->m_height );
+
+ return FALSE;
+}
+
//-----------------------------------------------------------------------------
// wxButton
//-----------------------------------------------------------------------------
gtk_signal_connect_after( GTK_OBJECT(m_widget), "clicked",
GTK_SIGNAL_FUNC(gtk_button_clicked_callback), (gpointer*)this );
+ gtk_signal_connect_after( GTK_OBJECT(m_widget), "style_set",
+ GTK_SIGNAL_FUNC(gtk_button_style_set_callback), (gpointer*) this );
+
m_parent->DoAddChild( this );
PostCreation(size);
if (GTK_WIDGET_CAN_DEFAULT(m_widget))
{
#ifdef __WXGTK20__
-#if 0
- GtkBorder *default_border;
- gtk_widget_style_get( m_widget, "default_border", &default_border, NULL );
- if (default_border)
- {
- left_border += default_border->left;
- right_border += default_border->right;
- top_border += default_border->top;
- bottom_border += default_border->bottom;
- g_free( default_border );
-
- }
-#endif
- GtkBorder *default_outside_border;
+ GtkBorder *default_outside_border = NULL;
+ gtk_widget_style_get( m_widget, "default_outside_border", &default_outside_border, NULL );
+ if (default_outside_border)
{
- gtk_widget_style_get( m_widget, "default_outside_border", &default_outside_border, NULL );
left_border += default_outside_border->left;
right_border += default_outside_border->right;
top_border += default_outside_border->top;
button->GetEventHandler()->ProcessEvent(event);
}
+//-----------------------------------------------------------------------------
+// "style_set" from m_widget
+//-----------------------------------------------------------------------------
+
+static gint
+gtk_button_style_set_callback( GtkWidget *m_widget, GtkStyle *WXUNUSED(style), wxButton *win )
+{
+ if (g_isIdle)
+ wxapp_install_idle_handler();
+
+ if (GTK_WIDGET_REALIZED(m_widget))
+ win->SetSize( win->m_x, win->m_y, win->m_width, win->m_height );
+
+ return FALSE;
+}
+
//-----------------------------------------------------------------------------
// wxButton
//-----------------------------------------------------------------------------
gtk_signal_connect_after( GTK_OBJECT(m_widget), "clicked",
GTK_SIGNAL_FUNC(gtk_button_clicked_callback), (gpointer*)this );
+ gtk_signal_connect_after( GTK_OBJECT(m_widget), "style_set",
+ GTK_SIGNAL_FUNC(gtk_button_style_set_callback), (gpointer*) this );
+
m_parent->DoAddChild( this );
PostCreation(size);
if (GTK_WIDGET_CAN_DEFAULT(m_widget))
{
#ifdef __WXGTK20__
-#if 0
- GtkBorder *default_border;
- gtk_widget_style_get( m_widget, "default_border", &default_border, NULL );
- if (default_border)
- {
- left_border += default_border->left;
- right_border += default_border->right;
- top_border += default_border->top;
- bottom_border += default_border->bottom;
- g_free( default_border );
-
- }
-#endif
- GtkBorder *default_outside_border;
+ GtkBorder *default_outside_border = NULL;
+ gtk_widget_style_get( m_widget, "default_outside_border", &default_outside_border, NULL );
+ if (default_outside_border)
{
- gtk_widget_style_get( m_widget, "default_outside_border", &default_outside_border, NULL );
left_border += default_outside_border->left;
right_border += default_outside_border->right;
top_border += default_outside_border->top;