Send wxEVT_SYS_COLOUR_CHANGED on dark/light theme change in wxMSW
wxOSX already does it, so do it in wxMSW too for consistency and because it seems useful to be able to react to the same event in all cases. Update the drawing sample to refresh its system colours scheme whenever the theme is changed.
This commit is contained in:
parent
7ce2ba9b0c
commit
a7b39f63b3
2 changed files with 14 additions and 0 deletions
|
|
@ -524,6 +524,13 @@ MyCanvas::MyCanvas(MyFrame *parent)
|
|||
m_useBuffer = false;
|
||||
m_showBBox = false;
|
||||
m_sizeDIP = wxSize(0, 0);
|
||||
|
||||
Bind(wxEVT_SYS_COLOUR_CHANGED, [this](wxSysColourChangedEvent& event) {
|
||||
event.Skip();
|
||||
|
||||
if ( m_show == File_ShowSystemColours )
|
||||
Refresh();
|
||||
});
|
||||
}
|
||||
|
||||
void MyCanvas::DrawTestBrushes(wxDC& dc)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue