Fix font scaling issues in StatusBar and Selection Filter.

Fixes https://gitlab.com/kicad/code/kicad/issues/8608
This commit is contained in:
Jeff Young 2021-09-11 18:24:25 +01:00
parent 625e56676a
commit ed8b63505d
4 changed files with 20 additions and 3 deletions

View File

@ -99,6 +99,11 @@ wxFont KIUI::GetGUIFont( wxWindow* aWindow, int aRelativeSize )
{
wxFont font = aWindow->GetFont();
#ifdef __WXMSW__
// -2 is too small on MSW
aRelativeSize = std::max( aRelativeSize, -1 );
#endif
font.SetPointSize( font.GetPointSize() + aRelativeSize );
// Both wxFont::SetSymbolicSize() and wxWindow::ConvertDialogToPixels() fail on some GTKs

View File

@ -29,6 +29,20 @@ PANEL_SELECTION_FILTER::PANEL_SELECTION_FILTER( wxWindow* aParent ) :
m_frame( dynamic_cast<PCB_BASE_EDIT_FRAME*>( aParent ) ),
m_onlyCheckbox( nullptr )
{
wxFont font = KIUI::GetGUIFont( this, -2 );
m_cbLockedItems->SetFont( font );
m_cbFootprints->SetFont( font );
m_cbText->SetFont( font );
m_cbTracks->SetFont( font );
m_cbVias->SetFont( font );
m_cbPads->SetFont( font );
m_cbGraphics->SetFont( font );
m_cbZones->SetFont( font );
m_cbKeepouts->SetFont( font );
m_cbDimensions->SetFont( font );
m_cbOtherItems->SetFont( font );
m_cbAllItems->SetFont( font );
wxASSERT( m_frame );
m_tool = m_frame->GetToolManager()->GetTool<PCB_SELECTION_TOOL>();
wxASSERT( m_tool );

View File

@ -11,8 +11,6 @@
PANEL_SELECTION_FILTER_BASE::PANEL_SELECTION_FILTER_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
{
this->SetFont( wxFont( 9, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
wxGridBagSizer* gbSizer1;
gbSizer1 = new wxGridBagSizer( 0, 0 );
gbSizer1->SetFlexibleDirection( wxBOTH );

View File

@ -36,7 +36,7 @@
<property name="enabled">1</property>
<property name="event_handler">impl_virtual</property>
<property name="fg"></property>
<property name="font">,90,90,9,70,0</property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>