mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-08-17 17:02:51 +08:00
Add Refresh() in wxWindowMSW::OnSysColourChanged()
Refresh the windows when any system settings change, including changes to the colours and metrics. See #26424.
This commit is contained in:
committed by
Vadim Zeitlin
parent
5bc58ae3d1
commit
c4cf2c48ee
@@ -5243,6 +5243,17 @@ bool wxWindowMSW::HandleSettingChange(WXWPARAM wParam, WXLPARAM lParam)
|
||||
node = node->GetNext();
|
||||
}
|
||||
|
||||
// We don't always need to refresh the window as many settings don't affect
|
||||
// its appearance (e.g. we could avoid it for wParam==SPI_SETDESKWALLPAPER
|
||||
// as we're not affected by the desktop background change), but it is
|
||||
// difficult to determine when we need to do it or not, so just always do
|
||||
// as it's less bad to refresh the window unnecessarily than to fail to do
|
||||
// it when we should.
|
||||
//
|
||||
// Note that only TLWs need to be refreshed, as refresh is recursive.
|
||||
if ( IsTopLevel() )
|
||||
Refresh();
|
||||
|
||||
// let the system handle it
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user