combo->GetEventHandler()->ProcessEvent( event );
}
}
+
+extern "C" {
+static
+void gtkcombobox_size_callback( GtkWidget *widget,
+ GtkAllocation *alloc,
+ wxWindow *win )
+{
+ if (win->GetParent()->m_wxwindow) return;
+
+ // we are probably a wxToolBar
+
+ wxSize size = win->GetEffectiveMinSize();
+ if (size.y != alloc->height)
+ {
+ GtkAllocation alloc2;
+ alloc2.x = alloc->x;
+ alloc2.y = (alloc->height - size.y + 3) / 2;
+ alloc2.width = alloc->width;
+ alloc2.height = size.y;
+ gtk_widget_size_allocate( widget, &alloc2 );
+ }
+}
+}
+
#endif
//-----------------------------------------------------------------------------
g_signal_connect_after (m_widget, "changed",
G_CALLBACK (gtkcombobox_changed_callback), this);
+
+ // Connect to in order to correct size_allocate events
+ g_signal_connect_after (m_widget, "size_allocate",
+ G_CALLBACK (gtkcombobox_size_callback), this);
}
else
#endif
this);
g_signal_connect_after (entry, "changed",
G_CALLBACK (gtkcombo_text_changed_callback), this);
-
- // This is required for tool bar support
- // Doesn't currently work
-// wxSize setsize = GetSize();
-// gtk_widget_set_size_request( m_widget, setsize.x, setsize.y );
}
SetInitialSize(size); // need this too because this is a wxControlWithItems
-
return true;
}