From: Václav Slavík Date: Sun, 13 Jun 2004 13:09:16 +0000 (+0000) Subject: fixed background rendering if GetThemeEnabled()=true with GTK2 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/90b85bfcde1752db19ab8453e8aa77986b3f4273 fixed background rendering if GetThemeEnabled()=true with GTK2 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 703767083e..150aabdcfc 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -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__ { diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 703767083e..150aabdcfc 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -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__ {