From beffb32d2d67ef950534057b3a1be28ab4649fed Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Fri, 2 Oct 2015 10:11:58 -0700 Subject: [PATCH] Avoid invalidating best size for foreground/background color change --- src/gtk/window.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 22a8f64313..031de383dc 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -4458,9 +4458,6 @@ void wxWindowGTK::GTKApplyWidgetStyle(bool forceStyle) g_object_unref(style); #endif } - - // Style change may affect GTK+'s size calculation: - InvalidateBestSize(); } void wxWindowGTK::DoApplyWidgetStyle(GtkRcStyle *style) @@ -4768,6 +4765,7 @@ bool wxWindowGTK::SetFont( const wxFont &font ) // apply style change (forceStyle=true so that new style is applied // even if the font changed from valid to wxNullFont): GTKApplyWidgetStyle(true); + InvalidateBestSize(); } #ifdef __WXGTK3__