]> git.saurik.com Git - wxWidgets.git/commitdiff
call GTKApplyWidgetStyle() from PostCreation() instead of GTKHandleRealized()
authorPaul Cornett <paulcor@bullseye.com>
Thu, 10 Jan 2013 07:17:01 +0000 (07:17 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Thu, 10 Jan 2013 07:17:01 +0000 (07:17 +0000)
it's a better place to catch font or color changes made before creation

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73361 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/control.cpp
src/gtk/menu.cpp
src/gtk/window.cpp

index dee13ff82c2d69562141c82b9e2e00fd0cf2ca64..705da6fa502eba15a9843910cada8371965b582a 100644 (file)
@@ -105,7 +105,6 @@ void wxControl::PostCreation(const wxSize& size)
     gtk_widget_ensure_style(m_widget);
 #endif
 
-    GTKApplyWidgetStyle();
     SetInitialSize(size);
 }
 
index 694c0d503a759c7f1fc89fd62147741b6ca2d631..b1c72ada506933294290381b509822be93a652af 100644 (file)
@@ -101,8 +101,6 @@ void wxMenuBar::Init(size_t n, wxMenu *menus[], const wxString titles[], long st
     }
 
     PostCreation();
-
-    GTKApplyWidgetStyle();
 #endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2/!wxUSE_LIBHILDON && !wxUSE_LIBHILDON2
 
     g_object_ref_sink(m_widget);
index 81d79956296b5d10f07addddecb93b5054c694cb..3805f1ba5aba5b2b16e3a1b4eb647a03cdc473c7 100644 (file)
@@ -2020,8 +2020,6 @@ void wxWindowGTK::GTKHandleRealized()
     }
 #endif
 
-    GTKApplyWidgetStyle();
-
     wxWindowCreateEvent event(static_cast<wxWindow*>(this));
     event.SetEventObject( this );
     GTKProcessEvent( event );
@@ -2582,6 +2580,9 @@ void wxWindowGTK::PostCreation()
     if (!WX_IS_PIZZA(gtk_widget_get_parent(m_widget)) && !GTK_IS_WINDOW(m_widget))
         gtk_widget_set_size_request(m_widget, m_width, m_height);
 
+    // apply any font or color changes made before creation
+    GTKApplyWidgetStyle();
+
     InheritAttributes();
 
     SetLayoutDirection(wxLayout_Default);