]> git.saurik.com Git - wxWidgets.git/commitdiff
Corrceted background problem with themes.
authorRobert Roebling <robert@roebling.de>
Wed, 5 Jan 2000 15:02:28 +0000 (15:02 +0000)
committerRobert Roebling <robert@roebling.de>
Wed, 5 Jan 2000 15:02:28 +0000 (15:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/panelg.cpp
src/gtk/window.cpp
src/gtk1/window.cpp

index 9ac21f6245eac7a1534207f5204cd8b0d2ea97e0..a6521927222eea87890260052360ab19e6f5193c 100644 (file)
@@ -55,10 +55,8 @@ bool wxPanel::Create(wxWindow *parent, wxWindowID id,
 
     if ( ret )
     {
-#ifndef __WXGTK__
         SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
         SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
-#endif
     }
 
     return ret;
index cc3a5b7c45ef43f12698504a26f9f93c33d0b6bb..332fd7407e3f30509b2e609aa734912ea22c0662 100644 (file)
@@ -2891,7 +2891,8 @@ bool wxWindow::SetBackgroundColour( const wxColour &colour )
         return TRUE;
     }
 
-    if (m_wxwindow)
+    if ((m_wxwindow) &&
+        (m_backgroundColour != wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE)))
     {
         /* wxMSW doesn't clear the window here. I don't do that either to
           provide compatibility. call Clear() to do the job. */
@@ -2900,17 +2901,7 @@ bool wxWindow::SetBackgroundColour( const wxColour &colour )
         gdk_window_set_background( window, m_backgroundColour.GetColor() );
     }
 
-    wxColour sysbg = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE );
-    if (sysbg == m_backgroundColour)
-    {
-        m_backgroundColour = wxNullColour;
-        ApplyWidgetStyle();
-        m_backgroundColour = sysbg;
-    }
-    else
-    {
-        ApplyWidgetStyle();
-    }
+    ApplyWidgetStyle();
 
     return TRUE;
 }
@@ -2943,17 +2934,7 @@ bool wxWindow::SetForegroundColour( const wxColour &colour )
         return TRUE;
     }
 
-    wxColour sysbg = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE );
-    if ( sysbg == m_backgroundColour )
-    {
-        m_backgroundColour = wxNullColour;
-        ApplyWidgetStyle();
-        m_backgroundColour = sysbg;
-    }
-    else
-    {
-        ApplyWidgetStyle();
-    }
+    ApplyWidgetStyle();
 
     return TRUE;
 }
index cc3a5b7c45ef43f12698504a26f9f93c33d0b6bb..332fd7407e3f30509b2e609aa734912ea22c0662 100644 (file)
@@ -2891,7 +2891,8 @@ bool wxWindow::SetBackgroundColour( const wxColour &colour )
         return TRUE;
     }
 
-    if (m_wxwindow)
+    if ((m_wxwindow) &&
+        (m_backgroundColour != wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE)))
     {
         /* wxMSW doesn't clear the window here. I don't do that either to
           provide compatibility. call Clear() to do the job. */
@@ -2900,17 +2901,7 @@ bool wxWindow::SetBackgroundColour( const wxColour &colour )
         gdk_window_set_background( window, m_backgroundColour.GetColor() );
     }
 
-    wxColour sysbg = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE );
-    if (sysbg == m_backgroundColour)
-    {
-        m_backgroundColour = wxNullColour;
-        ApplyWidgetStyle();
-        m_backgroundColour = sysbg;
-    }
-    else
-    {
-        ApplyWidgetStyle();
-    }
+    ApplyWidgetStyle();
 
     return TRUE;
 }
@@ -2943,17 +2934,7 @@ bool wxWindow::SetForegroundColour( const wxColour &colour )
         return TRUE;
     }
 
-    wxColour sysbg = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE );
-    if ( sysbg == m_backgroundColour )
-    {
-        m_backgroundColour = wxNullColour;
-        ApplyWidgetStyle();
-        m_backgroundColour = sysbg;
-    }
-    else
-    {
-        ApplyWidgetStyle();
-    }
+    ApplyWidgetStyle();
 
     return TRUE;
 }