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
This commit is contained in:
@@ -3896,16 +3896,14 @@ void wxWindowMSW::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
// update the colours we use if they were not set explicitly by the user:
|
// 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
|
// this must be done or OnCtlColor() would continue to use the old colours
|
||||||
if ( !m_hasFgCol )
|
if ( !m_hasFgCol || !m_hasBgCol )
|
||||||
{
|
{
|
||||||
m_foregroundColour = wxSystemSettings::
|
wxVisualAttributes attrs = GetDefaultAttributes();
|
||||||
GetSystemColour(wxSYS_COLOUR_WINDOWTEXT);
|
if ( !m_hasFgCol )
|
||||||
}
|
m_foregroundColour = attrs.colFg;
|
||||||
|
|
||||||
if ( !m_hasBgCol )
|
if ( !m_hasBgCol )
|
||||||
{
|
m_backgroundColour = attrs.colBg;
|
||||||
m_backgroundColour = wxSystemSettings::
|
|
||||||
GetSystemColour(wxSYS_COLOUR_BTNFACE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user