Changed processing of a wxEVT_SYS_COLOUR_CHANGED event.

Only UI is updated. The application doesn't recreated now
This commit is contained in:
YuSanka 2020-05-21 17:29:00 +02:00
parent 4348b177d6
commit db32c1f15a
13 changed files with 170 additions and 0 deletions

View file

@ -124,6 +124,12 @@ public:
// set value to _true_ in purpose of possibility of a display dpi changing from System Settings
m_can_rescale = true;
});
this->Bind(wxEVT_SYS_COLOUR_CHANGED, [this](wxSysColourChangedEvent& event)
{
event.Skip();
on_sys_color_changed();
});
}
virtual ~DPIAware() {}
@ -137,6 +143,7 @@ public:
protected:
virtual void on_dpi_changed(const wxRect &suggested_rect) = 0;
virtual void on_sys_color_changed() {};
private:
float m_scale_factor;