]> git.saurik.com Git - wxWidgets.git/commitdiff
Give wxWindowGTK::ApplyWidgetStyle an implementation too so
authorRobin Dunn <robin@alldunn.com>
Fri, 18 Jun 2004 17:30:32 +0000 (17:30 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 18 Jun 2004 17:30:32 +0000 (17:30 +0000)
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

src/gtk/window.cpp
src/gtk1/window.cpp

index e9310bd3aa7e48514dd3578845a834b7acf025fd..045dbfc9fa6c868f7664e7a8beed83242fa52bd3 100644 (file)
@@ -145,7 +145,7 @@ extern GtkContainerClass *pizza_parent_class;
    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
@@ -4085,8 +4085,18 @@ GtkRcStyle *wxWindowGTK::CreateWidgetStyle(bool forceStyle)
     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);
+    }
 }
 
 //-----------------------------------------------------------------------------
index e9310bd3aa7e48514dd3578845a834b7acf025fd..045dbfc9fa6c868f7664e7a8beed83242fa52bd3 100644 (file)
@@ -145,7 +145,7 @@ extern GtkContainerClass *pizza_parent_class;
    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
@@ -4085,8 +4085,18 @@ GtkRcStyle *wxWindowGTK::CreateWidgetStyle(bool forceStyle)
     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);
+    }
 }
 
 //-----------------------------------------------------------------------------