Fix wx[Check]ListBox font and margin on DPI change

These control are drawn using a wxDC. When the DPI changes, call SetFont
to update the font of the wxDC. First call wxListBoxBase::SetFont() so
m_font is updated to the new DPI, then use this font in the wxDC.
For wxCheckListBox update the margins to fit the changed checkbox size.
This commit is contained in:
Maarten Bent
2019-01-10 21:54:16 +01:00
parent 123da53306
commit fd2cf1f4e2
4 changed files with 30 additions and 5 deletions

View File

@@ -81,6 +81,8 @@ protected:
ProcessCommand(event);
}
virtual void MSWUpdateFontOnDPIChange(const wxSize& newDPI) wxOVERRIDE;
wxSize DoGetBestClientSize() const wxOVERRIDE;
wxDECLARE_EVENT_TABLE();