call GTKApplyWidgetStyle() from PostCreation() instead of GTKHandleRealized()
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
This commit is contained in:
@@ -105,7 +105,6 @@ void wxControl::PostCreation(const wxSize& size)
|
|||||||
gtk_widget_ensure_style(m_widget);
|
gtk_widget_ensure_style(m_widget);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GTKApplyWidgetStyle();
|
|
||||||
SetInitialSize(size);
|
SetInitialSize(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -101,8 +101,6 @@ void wxMenuBar::Init(size_t n, wxMenu *menus[], const wxString titles[], long st
|
|||||||
}
|
}
|
||||||
|
|
||||||
PostCreation();
|
PostCreation();
|
||||||
|
|
||||||
GTKApplyWidgetStyle();
|
|
||||||
#endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2/!wxUSE_LIBHILDON && !wxUSE_LIBHILDON2
|
#endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2/!wxUSE_LIBHILDON && !wxUSE_LIBHILDON2
|
||||||
|
|
||||||
g_object_ref_sink(m_widget);
|
g_object_ref_sink(m_widget);
|
||||||
|
@@ -2020,8 +2020,6 @@ void wxWindowGTK::GTKHandleRealized()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GTKApplyWidgetStyle();
|
|
||||||
|
|
||||||
wxWindowCreateEvent event(static_cast<wxWindow*>(this));
|
wxWindowCreateEvent event(static_cast<wxWindow*>(this));
|
||||||
event.SetEventObject( this );
|
event.SetEventObject( this );
|
||||||
GTKProcessEvent( event );
|
GTKProcessEvent( event );
|
||||||
@@ -2582,6 +2580,9 @@ void wxWindowGTK::PostCreation()
|
|||||||
if (!WX_IS_PIZZA(gtk_widget_get_parent(m_widget)) && !GTK_IS_WINDOW(m_widget))
|
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);
|
gtk_widget_set_size_request(m_widget, m_width, m_height);
|
||||||
|
|
||||||
|
// apply any font or color changes made before creation
|
||||||
|
GTKApplyWidgetStyle();
|
||||||
|
|
||||||
InheritAttributes();
|
InheritAttributes();
|
||||||
|
|
||||||
SetLayoutDirection(wxLayout_Default);
|
SetLayoutDirection(wxLayout_Default);
|
||||||
|
Reference in New Issue
Block a user