Fix font of wxRadioBox after DPI change

This commit is contained in:
Maarten Bent
2019-08-27 23:20:20 +02:00
parent 13cb9d41d8
commit 587f894f96
2 changed files with 10 additions and 0 deletions

View File

@@ -162,6 +162,8 @@ protected:
virtual WXHRGN MSWGetRegionWithoutChildren() wxOVERRIDE;
virtual void MSWUpdateFontOnDPIChange(const wxSize& newDPI) wxOVERRIDE;
// resolve ambiguity in base classes
virtual wxBorder GetDefaultBorder() const wxOVERRIDE { return wxRadioBoxBase::GetDefaultBorder(); }

View File

@@ -751,6 +751,14 @@ int wxRadioBox::GetItemFromPoint(const wxPoint& pt) const
return wxNOT_FOUND;
}
void wxRadioBox::MSWUpdateFontOnDPIChange(const wxSize& newDPI)
{
wxStaticBox::MSWUpdateFontOnDPIChange(newDPI);
if ( m_font.IsOk() )
m_radioButtons->SetFont(m_font);
}
// ----------------------------------------------------------------------------
// radio box drawing
// ----------------------------------------------------------------------------