]> git.saurik.com Git - wxWidgets.git/commitdiff
use the window default colours, not hardcoded ones, in OnSysColourChanged()
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 1 Apr 2004 11:08:44 +0000 (11:08 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 1 Apr 2004 11:08:44 +0000 (11:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index fc14d47191c57d1cb5c91e35d86cf28d000d5bae..a8191c4e4342a5674deb1bc0b8c1a0218d242109 100644 (file)
@@ -3896,16 +3896,14 @@ void wxWindowMSW::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event))
 
     // update the colours we use if they were not set explicitly by the user:
     // this must be done or OnCtlColor() would continue to use the old colours
 
     // update the colours we use if they were not set explicitly by the user:
     // this must be done or OnCtlColor() would continue to use the old colours
-    if ( !m_hasFgCol )
+    if ( !m_hasFgCol || !m_hasBgCol )
     {
     {
-        m_foregroundColour = wxSystemSettings::
-                                GetSystemColour(wxSYS_COLOUR_WINDOWTEXT);
-    }
+        wxVisualAttributes attrs = GetDefaultAttributes();
+        if ( !m_hasFgCol )
+            m_foregroundColour = attrs.colFg;
 
 
-    if ( !m_hasBgCol )
-    {
-        m_backgroundColour = wxSystemSettings::
-                                GetSystemColour(wxSYS_COLOUR_BTNFACE);
+        if ( !m_hasBgCol )
+            m_backgroundColour = attrs.colBg;
     }
 }
 
     }
 }