Fix font scaling issues in StatusBar and Selection Filter.
Fixes https://gitlab.com/kicad/code/kicad/issues/8608
This commit is contained in:
parent
625e56676a
commit
ed8b63505d
|
@ -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
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue