]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed background rendering if GetThemeEnabled()=true with GTK2
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 13 Jun 2004 13:09:16 +0000 (13:09 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 13 Jun 2004 13:09:16 +0000 (13:09 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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

index 703767083e7378788984d3524dfc6ba4e9f8b0ba..150aabdcfc519ae9b29ce76579ceea400db3b376 100644 (file)
@@ -3819,11 +3819,9 @@ void wxWindowGTK::GtkSendPaintEvents()
     // Clip to paint region in wxClientDC
     m_clipPaintRegion = TRUE;
 
-#ifndef __WXGTK20__
     // widget to draw on
     GtkPizza *pizza = GTK_PIZZA (m_wxwindow);
 
-    // later for GTK 2.0, too.
     if (GetThemeEnabled())
     {
         // find ancestor from which to steal background
@@ -3844,7 +3842,7 @@ void wxWindowGTK::GtkSendPaintEvents()
 
             gtk_paint_flat_box( parent->m_widget->style,
                         pizza->bin_window,
-                        GTK_STATE_NORMAL,
+                        (GtkStateType)GTK_WIDGET_STATE(m_wxwindow),
                         GTK_SHADOW_NONE,
                         &rect,
                         parent->m_widget,
@@ -3855,7 +3853,6 @@ void wxWindowGTK::GtkSendPaintEvents()
         }
     }
     else
-#endif
 
 #ifdef __WXGTK20__
     {
index 703767083e7378788984d3524dfc6ba4e9f8b0ba..150aabdcfc519ae9b29ce76579ceea400db3b376 100644 (file)
@@ -3819,11 +3819,9 @@ void wxWindowGTK::GtkSendPaintEvents()
     // Clip to paint region in wxClientDC
     m_clipPaintRegion = TRUE;
 
-#ifndef __WXGTK20__
     // widget to draw on
     GtkPizza *pizza = GTK_PIZZA (m_wxwindow);
 
-    // later for GTK 2.0, too.
     if (GetThemeEnabled())
     {
         // find ancestor from which to steal background
@@ -3844,7 +3842,7 @@ void wxWindowGTK::GtkSendPaintEvents()
 
             gtk_paint_flat_box( parent->m_widget->style,
                         pizza->bin_window,
-                        GTK_STATE_NORMAL,
+                        (GtkStateType)GTK_WIDGET_STATE(m_wxwindow),
                         GTK_SHADOW_NONE,
                         &rect,
                         parent->m_widget,
@@ -3855,7 +3853,6 @@ void wxWindowGTK::GtkSendPaintEvents()
         }
     }
     else
-#endif
 
 #ifdef __WXGTK20__
     {