From 260a67b7aaabe1a3628c9b26a95e0d0f53f2bca4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sat, 23 Oct 2004 16:10:26 +0000 Subject: [PATCH] fixing sizing bug inside wxWizard git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/combobox.cpp | 9 +++++++++ src/gtk1/combobox.cpp | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp index 858e3d13b6..7d42568e62 100644 --- a/src/gtk/combobox.cpp +++ b/src/gtk/combobox.cpp @@ -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(); } diff --git a/src/gtk1/combobox.cpp b/src/gtk1/combobox.cpp index 858e3d13b6..7d42568e62 100644 --- a/src/gtk1/combobox.cpp +++ b/src/gtk1/combobox.cpp @@ -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(); } -- 2.45.2