diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 07ff8e6952..8f3eadcf97 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -4230,6 +4230,9 @@ void wxWindowGTK::ApplyWidgetStyle(bool forceStyle) DoApplyWidgetStyle(style); gtk_rc_style_unref(style); } + + // Style change may affect GTK+'s size calculation: + InvalidateBestSize(); } void wxWindowGTK::DoApplyWidgetStyle(GtkRcStyle *style) diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 07ff8e6952..8f3eadcf97 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -4230,6 +4230,9 @@ void wxWindowGTK::ApplyWidgetStyle(bool forceStyle) DoApplyWidgetStyle(style); gtk_rc_style_unref(style); } + + // Style change may affect GTK+'s size calculation: + InvalidateBestSize(); } void wxWindowGTK::DoApplyWidgetStyle(GtkRcStyle *style)