Fix wxStatusBar font and position after DPI changes
Update the font of the associated wxDC so ellipsization uses the correct font size.
This commit is contained in:
@@ -166,7 +166,8 @@ bool wxStatusBar::SetFont(const wxFont& font)
|
||||
if (!wxWindow::SetFont(font))
|
||||
return false;
|
||||
|
||||
if (m_pDC) m_pDC->SetFont(font);
|
||||
if ( m_pDC )
|
||||
m_pDC->SetFont(m_font);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -256,6 +257,14 @@ void wxStatusBar::MSWUpdateFieldsWidths()
|
||||
delete [] pWidths;
|
||||
}
|
||||
|
||||
void wxStatusBar::MSWUpdateFontOnDPIChange(const wxSize& newDPI)
|
||||
{
|
||||
wxStatusBarBase::MSWUpdateFontOnDPIChange(newDPI);
|
||||
|
||||
if ( m_pDC && m_font.IsOk() )
|
||||
m_pDC->SetFont(m_font);
|
||||
}
|
||||
|
||||
void wxStatusBar::DoUpdateStatusText(int nField)
|
||||
{
|
||||
if (!m_pDC)
|
||||
|
Reference in New Issue
Block a user