]> git.saurik.com Git - wxWidgets.git/commitdiff
fixing sizing bug inside wxWizard
authorVáclav Slavík <vslavik@fastmail.fm>
Sat, 23 Oct 2004 16:10:26 +0000 (16:10 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sat, 23 Oct 2004 16:10:26 +0000 (16:10 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/combobox.cpp
src/gtk1/combobox.cpp

index 858e3d13b6563977d9ec76dc2ad8614c90310e51..7d42568e62683b26c985ae0dba8f665b3270c524 100644 (file)
@@ -731,6 +731,15 @@ void wxComboBox::EnableEvents()
 
 void wxComboBox::OnSize( wxSizeEvent &event )
 {
+    // NB: In some situations (e.g. on non-first page of a wizard, if the
+    //     size used is default size), GtkCombo widget is resized correctly,
+    //     but it's look is not updated, it's rendered as if it was much wider.
+    //     No other widgets are affected, so it looks like a bug in GTK+.
+    //     Manually requesting resize calculation (as gtk_pizza_set_size does)
+    //     fixes it.
+    if (GTK_WIDGET_VISIBLE(m_widget))
+        gtk_widget_queue_resize(m_widget);
+
     event.Skip();
 }
 
index 858e3d13b6563977d9ec76dc2ad8614c90310e51..7d42568e62683b26c985ae0dba8f665b3270c524 100644 (file)
@@ -731,6 +731,15 @@ void wxComboBox::EnableEvents()
 
 void wxComboBox::OnSize( wxSizeEvent &event )
 {
+    // NB: In some situations (e.g. on non-first page of a wizard, if the
+    //     size used is default size), GtkCombo widget is resized correctly,
+    //     but it's look is not updated, it's rendered as if it was much wider.
+    //     No other widgets are affected, so it looks like a bug in GTK+.
+    //     Manually requesting resize calculation (as gtk_pizza_set_size does)
+    //     fixes it.
+    if (GTK_WIDGET_VISIBLE(m_widget))
+        gtk_widget_queue_resize(m_widget);
+
     event.Skip();
 }