From 993da3969b28e4f80b492cc26114fb0e151163cb Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 1 Apr 2004 11:08:44 +0000 Subject: [PATCH] use the window default colours, not hardcoded ones, in OnSysColourChanged() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/window.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index fc14d47191..a8191c4e43 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -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 - 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; } }