Give wxWindowGTK::ApplyWidgetStyle an implementation too so

non-control windows can also change colours, etc.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-06-18 17:30:32 +00:00
parent a2df8090e8
commit f8e045e24b
2 changed files with 24 additions and 4 deletions

View File

@@ -145,7 +145,7 @@ extern GtkContainerClass *pizza_parent_class;
thw wxWindow class has a member variable called m_widget which holds a thw wxWindow class has a member variable called m_widget which holds a
pointer to this widget. When the window class represents a GTK native widget, pointer to this widget. When the window class represents a GTK native widget,
this is (in most cases) the only GTK widget the class manages. E.g. the this is (in most cases) the only GTK widget the class manages. E.g. the
wxStatitText class handles only a GtkLabel widget a pointer to which you wxStaticText class handles only a GtkLabel widget a pointer to which you
can find in m_widget (defined in wxWindow) can find in m_widget (defined in wxWindow)
When the class has a client area for drawing into and for containing children When the class has a client area for drawing into and for containing children
@@ -4085,8 +4085,18 @@ GtkRcStyle *wxWindowGTK::CreateWidgetStyle(bool forceStyle)
return style; return style;
} }
void wxWindowGTK::ApplyWidgetStyle(bool WXUNUSED(forceStyle)) void wxWindowGTK::ApplyWidgetStyle(bool forceStyle)
{ {
GtkRcStyle *style = CreateWidgetStyle(forceStyle);
if ( style )
{
if (m_wxwindow)
// should we also do m_widget in this case?
gtk_widget_modify_style(m_wxwindow, style);
else
gtk_widget_modify_style(m_widget, style);
gtk_rc_style_unref(style);
}
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@@ -145,7 +145,7 @@ extern GtkContainerClass *pizza_parent_class;
thw wxWindow class has a member variable called m_widget which holds a thw wxWindow class has a member variable called m_widget which holds a
pointer to this widget. When the window class represents a GTK native widget, pointer to this widget. When the window class represents a GTK native widget,
this is (in most cases) the only GTK widget the class manages. E.g. the this is (in most cases) the only GTK widget the class manages. E.g. the
wxStatitText class handles only a GtkLabel widget a pointer to which you wxStaticText class handles only a GtkLabel widget a pointer to which you
can find in m_widget (defined in wxWindow) can find in m_widget (defined in wxWindow)
When the class has a client area for drawing into and for containing children When the class has a client area for drawing into and for containing children
@@ -4085,8 +4085,18 @@ GtkRcStyle *wxWindowGTK::CreateWidgetStyle(bool forceStyle)
return style; return style;
} }
void wxWindowGTK::ApplyWidgetStyle(bool WXUNUSED(forceStyle)) void wxWindowGTK::ApplyWidgetStyle(bool forceStyle)
{ {
GtkRcStyle *style = CreateWidgetStyle(forceStyle);
if ( style )
{
if (m_wxwindow)
// should we also do m_widget in this case?
gtk_widget_modify_style(m_wxwindow, style);
else
gtk_widget_modify_style(m_widget, style);
gtk_rc_style_unref(style);
}
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------