From: Vadim Zeitlin Date: Fri, 1 Jun 2012 11:01:31 +0000 (+0000) Subject: Keep user-set wxFrame background color even if MSW system background changes. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3ceb10b16235dfc7458de6dff2dafc2306946452 Keep user-set wxFrame background color even if MSW system background changes. Don't override wxFrame background colour when the system background colour changes if it was explicitly set by the user. Closes #14364. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index f61c8f5f0c..65b40d01f5 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -432,8 +432,12 @@ void wxFrame::InternalSetMenuBar() // Responds to colour changes, and passes event on to children. void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event) { - SetOwnBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE)); - Refresh(); + // Don't override the colour explicitly set by the user, if any. + if ( !UseBgCol() ) + { + SetOwnBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE)); + Refresh(); + } #if wxUSE_STATUSBAR if ( m_frameStatusBar )