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
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,
this is (in most cases) the only GTK widget the class manages. E.g. the
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,
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)
When the class has a client area for drawing into and for containing children
can find in m_widget (defined in wxWindow)
When the class has a client area for drawing into and for containing children
-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);
+ }
}
//-----------------------------------------------------------------------------
}
//-----------------------------------------------------------------------------
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,
this is (in most cases) the only GTK widget the class manages. E.g. the
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,
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)
When the class has a client area for drawing into and for containing children
can find in m_widget (defined in wxWindow)
When the class has a client area for drawing into and for containing children
-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);
+ }
}
//-----------------------------------------------------------------------------
}
//-----------------------------------------------------------------------------