From fbee62fc15ae24662561ee3eee0df688a20dc056 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 11 Sep 2021 13:44:12 +0100 Subject: [PATCH] Tie font size scaling to when automatic icon scaling fails. It appears that SetSymbolicSize() and ConvertDialogToPixes() fail under the same circumstances. --- common/dialogs/panel_setup_netclasses.cpp | 2 +- common/eda_draw_frame.cpp | 2 +- common/widgets/msgpanel.cpp | 11 ++---- common/widgets/ui_common.cpp | 39 ++++++------------- common/widgets/wx_grid.cpp | 4 +- cvpcb/cvpcb_mainframe.cpp | 6 +-- eeschema/dialogs/dialog_junction_props.cpp | 4 +- .../dialogs/dialog_lib_text_properties.cpp | 2 +- .../dialog_line_wire_bus_properties.cpp | 4 +- eeschema/dialogs/dialog_sheet_properties.cpp | 2 +- .../dialog_text_and_label_properties.cpp | 4 +- .../panel_eeschema_display_options.cpp | 2 +- include/widgets/ui_common.h | 4 +- kicad/kicad_manager_frame.cpp | 2 +- kicad/project_tree.cpp | 2 +- .../dialogs/properties_frame.cpp | 2 +- pcb_calculator/pcb_calculator_frame.cpp | 2 +- pcbnew/dialogs/dialog_board_statistics.cpp | 2 +- .../dialogs/dialog_footprint_properties.cpp | 2 +- .../dialog_footprint_properties_fp_editor.cpp | 2 +- pcbnew/dialogs/dialog_get_footprint_by_name.h | 2 +- .../dialog_global_edit_text_and_graphics.cpp | 2 +- .../dialog_global_edit_tracks_and_vias.cpp | 2 +- pcbnew/dialogs/dialog_pad_properties.cpp | 2 +- pcbnew/dialogs/dialog_text_properties.cpp | 2 +- pcbnew/dialogs/panel_fp_editor_defaults.cpp | 2 +- pcbnew/dialogs/panel_setup_constraints.cpp | 2 +- 27 files changed, 46 insertions(+), 68 deletions(-) diff --git a/common/dialogs/panel_setup_netclasses.cpp b/common/dialogs/panel_setup_netclasses.cpp index 750db8e911..1f96f25741 100644 --- a/common/dialogs/panel_setup_netclasses.cpp +++ b/common/dialogs/panel_setup_netclasses.cpp @@ -136,7 +136,7 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( PAGED_DIALOG* aParent, NETCLASSE attr->SetEditor( new GRID_CELL_ICON_TEXT_POPUP( g_lineStyleIcons, g_lineStyleNames ) ); m_netclassGrid->SetColAttr( GRID_LINESTYLE, attr ); - m_colorDefaultHelpText->SetFont( KIUI::GetInfoFont( this ) ); + m_colorDefaultHelpText->SetFont( KIUI::GetGUIFont( this, -1 ) ); } else { diff --git a/common/eda_draw_frame.cpp b/common/eda_draw_frame.cpp index ad24b6669c..1960876397 100644 --- a/common/eda_draw_frame.cpp +++ b/common/eda_draw_frame.cpp @@ -145,7 +145,7 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame }; SetStatusWidths( arrayDim( dims ), dims ); - stsbar->SetFont( KIUI::GetStatusFont( this ) ); + stsbar->SetFont( KIUI::GetGUIFont( this, -2 ) ); // Create child subwindows. GetClientSize( &m_frameSize.x, &m_frameSize.y ); diff --git a/common/widgets/msgpanel.cpp b/common/widgets/msgpanel.cpp index dcc342cae1..77e6642784 100644 --- a/common/widgets/msgpanel.cpp +++ b/common/widgets/msgpanel.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -23,11 +23,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -/** - * @file msgpanel.cpp - * @brief Message panel implementation file. - */ - #include #include @@ -48,7 +43,7 @@ EDA_MSG_PANEL::EDA_MSG_PANEL( wxWindow* aParent, int aId, long style, const wxString &name ) : wxPanel( aParent, aId, aPosition, aSize, style, name ) { - SetFont( KIUI::GetStatusFont( this ) ); + SetFont( KIUI::GetGUIFont( this, -2 ) ); SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); // informs wx not to paint the background itself as we will paint it later in erase() @@ -95,7 +90,7 @@ void EDA_MSG_PANEL::OnPaint( wxPaintEvent& aEvent ) dc.SetBackground( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); dc.SetBackgroundMode( wxSOLID ); dc.SetTextBackground( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - dc.SetFont( KIUI::GetStatusFont( this ) ); + dc.SetFont( KIUI::GetGUIFont( this ) ); for( const MSG_PANEL_ITEM& item : m_Items ) showItem( dc, item ); diff --git a/common/widgets/ui_common.cpp b/common/widgets/ui_common.cpp index f1d82a4595..597ddf8bbb 100644 --- a/common/widgets/ui_common.cpp +++ b/common/widgets/ui_common.cpp @@ -95,20 +95,23 @@ wxFont KIUI::GetMonospacedUIFont() } -wxFont makeGUIFont( wxWindow* aWindow, int aPtSize ) +wxFont KIUI::GetGUIFont( wxWindow* aWindow, int aRelativeSize ) { - wxFont font = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ); + wxFont font = aWindow->GetFont(); - // Using wxFont::SetSymbolicSize() fails on (at least) GTK with HiDPI screens (too small), - // and the dialog pixel conversion stuff fails on (at least) GTK _without_ HiDPI screens - // (too large). + font.SetPointSize( font.GetPointSize() + aRelativeSize ); + + // Both wxFont::SetSymbolicSize() and wxWindow::ConvertDialogToPixels() fail on some GTKs + // with HiDPI screens. These appear to be the same conditions under which automatic icon + // scaling fails, so we look for that and apply a patch. int requested_scale = Pgm().GetCommonSettings()->m_Appearance.icon_scale; - if( requested_scale <= 0 ) - requested_scale = KiIconScale( aWindow ); - - font.SetPointSize( KiROUND( aPtSize * requested_scale / 4.0 ) ); + if( requested_scale > 0 ) + { + double factor = static_cast( requested_scale ) / 4.0; + font.SetPointSize( KiROUND( font.GetPointSize() * factor ) ); + } #ifdef __WXMAC__ // https://trac.wxwidgets.org/ticket/19210 @@ -123,24 +126,6 @@ wxFont makeGUIFont( wxWindow* aWindow, int aPtSize ) } -wxFont KIUI::GetControlFont( wxWindow* aWindow ) -{ - return makeGUIFont( aWindow, 13 ); -} - - -wxFont KIUI::GetInfoFont( wxWindow* aWindow ) -{ - return makeGUIFont( aWindow, 12 ); -} - - -wxFont KIUI::GetStatusFont( wxWindow* aWindow ) -{ - return makeGUIFont( aWindow, 11 ); -} - - bool KIUI::EnsureTextCtrlWidth( wxTextCtrl* aCtrl, const wxString* aString ) { wxWindow* window = aCtrl->GetParent(); diff --git a/common/widgets/wx_grid.cpp b/common/widgets/wx_grid.cpp index 64a941be99..b4b8d981f0 100644 --- a/common/widgets/wx_grid.cpp +++ b/common/widgets/wx_grid.cpp @@ -40,7 +40,7 @@ WX_GRID::WX_GRID( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxS SetDefaultCellOverflow( false ); // Make sure the GUI font scales properly on GTK - SetDefaultCellFont( KIUI::GetControlFont( this ) ); + SetDefaultCellFont( KIUI::GetGUIFont( this ) ); } @@ -60,7 +60,7 @@ void WX_GRID::SetColLabelSize( int aHeight ) } // Make sure the GUI font scales properly on GTK - wxFont headingFont = KIUI::GetInfoFont( this ); + wxFont headingFont = KIUI::GetGUIFont( this ); headingFont.MakeBold(); SetLabelFont( headingFont ); diff --git a/cvpcb/cvpcb_mainframe.cpp b/cvpcb/cvpcb_mainframe.cpp index 83e43e1299..4cedd5652f 100644 --- a/cvpcb/cvpcb_mainframe.cpp +++ b/cvpcb/cvpcb_mainframe.cpp @@ -132,9 +132,9 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ) : wxStaticLine* staticline1 = new wxStaticLine( bottomPanel ); panelSizer->Add( staticline1, 0, wxEXPAND, 5 ); - m_statusLine1->SetFont( KIUI::GetInfoFont( this ) ); - m_statusLine2->SetFont( KIUI::GetInfoFont( this ) ); - m_statusLine3->SetFont( KIUI::GetInfoFont( this ) ); + m_statusLine1->SetFont( KIUI::GetGUIFont( this, -1 ) ); + m_statusLine2->SetFont( KIUI::GetGUIFont( this, -1 ) ); + m_statusLine3->SetFont( KIUI::GetGUIFont( this, -1 ) ); // Add buttons: auto buttonsSizer = new wxBoxSizer( wxHORIZONTAL ); diff --git a/eeschema/dialogs/dialog_junction_props.cpp b/eeschema/dialogs/dialog_junction_props.cpp index 562c514ca6..bb25e36d90 100644 --- a/eeschema/dialogs/dialog_junction_props.cpp +++ b/eeschema/dialogs/dialog_junction_props.cpp @@ -37,8 +37,8 @@ DIALOG_JUNCTION_PROPS::DIALOG_JUNCTION_PROPS( SCH_EDIT_FRAME* aParent, m_colorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED ); - m_helpLabel1->SetFont( KIUI::GetInfoFont( this ) ); - m_helpLabel2->SetFont( KIUI::GetInfoFont( this ) ); + m_helpLabel1->SetFont( KIUI::GetGUIFont( this, -1 ) ); + m_helpLabel2->SetFont( KIUI::GetGUIFont( this, -1 ) ); SetInitialFocus( m_textCtrlDiameter ); diff --git a/eeschema/dialogs/dialog_lib_text_properties.cpp b/eeschema/dialogs/dialog_lib_text_properties.cpp index 1f01551bf2..ff250a6fa9 100644 --- a/eeschema/dialogs/dialog_lib_text_properties.cpp +++ b/eeschema/dialogs/dialog_lib_text_properties.cpp @@ -45,7 +45,7 @@ DIALOG_LIB_TEXT_PROPERTIES::DIALOG_LIB_TEXT_PROPERTIES( SYMBOL_EDIT_FRAME* aPare m_TextValueSelectButton->Hide(); m_PowerComponentValues->Show( false ); - m_PowerComponentValues->SetFont( KIUI::GetInfoFont( this ) ); + m_PowerComponentValues->SetFont( KIUI::GetGUIFont( this, -1 ) ); SetInitialFocus( m_TextCtrl ); m_StyledTextCtrl->Show( false ); diff --git a/eeschema/dialogs/dialog_line_wire_bus_properties.cpp b/eeschema/dialogs/dialog_line_wire_bus_properties.cpp index e3cb76e709..1990b0cee5 100644 --- a/eeschema/dialogs/dialog_line_wire_bus_properties.cpp +++ b/eeschema/dialogs/dialog_line_wire_bus_properties.cpp @@ -64,8 +64,8 @@ DIALOG_LINE_WIRE_BUS_PROPERTIES::DIALOG_LINE_WIRE_BUS_PROPERTIES( SCH_EDIT_FRAME m_colorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED ); - m_helpLabel1->SetFont( KIUI::GetInfoFont( this ) ); - m_helpLabel2->SetFont( KIUI::GetInfoFont( this ) ); + m_helpLabel1->SetFont( KIUI::GetGUIFont( this, -1 ) ); + m_helpLabel2->SetFont( KIUI::GetGUIFont( this, -1 ) ); SetInitialFocus( m_lineWidth ); diff --git a/eeschema/dialogs/dialog_sheet_properties.cpp b/eeschema/dialogs/dialog_sheet_properties.cpp index f07376731b..3061d53581 100644 --- a/eeschema/dialogs/dialog_sheet_properties.cpp +++ b/eeschema/dialogs/dialog_sheet_properties.cpp @@ -81,7 +81,7 @@ DIALOG_SHEET_PROPERTIES::DIALOG_SHEET_PROPERTIES( SCH_EDIT_FRAME* aParent, SCH_S m_bpMoveDown->SetBitmap( KiBitmap( BITMAPS::small_down ) ); // Set font sizes - m_hierarchicalPathLabel->SetFont( KIUI::GetInfoFont( this ) ); + m_hierarchicalPathLabel->SetFont( KIUI::GetGUIFont( this, -2 ) ); // wxFormBuilder doesn't include this event... m_grid->Connect( wxEVT_GRID_CELL_CHANGING, diff --git a/eeschema/dialogs/dialog_text_and_label_properties.cpp b/eeschema/dialogs/dialog_text_and_label_properties.cpp index a5b9bb79cd..05aabf6201 100644 --- a/eeschema/dialogs/dialog_text_and_label_properties.cpp +++ b/eeschema/dialogs/dialog_text_and_label_properties.cpp @@ -116,8 +116,8 @@ DIALOG_TEXT_AND_LABEL_PROPERTIES::DIALOG_TEXT_AND_LABEL_PROPERTIES( SCH_EDIT_FRA if( m_CurrentText->Type() == SCH_GLOBAL_LABEL_T ) { - m_note1->SetFont( KIUI::GetInfoFont( this ) ); - m_note2->SetFont( KIUI::GetInfoFont( this ) ); + m_note1->SetFont( KIUI::GetGUIFont( this, -1 ) ); + m_note2->SetFont( KIUI::GetGUIFont( this, -1 ) ); } else { diff --git a/eeschema/dialogs/panel_eeschema_display_options.cpp b/eeschema/dialogs/panel_eeschema_display_options.cpp index d36effa451..5412bbaf80 100644 --- a/eeschema/dialogs/panel_eeschema_display_options.cpp +++ b/eeschema/dialogs/panel_eeschema_display_options.cpp @@ -37,7 +37,7 @@ PANEL_EESCHEMA_DISPLAY_OPTIONS::PANEL_EESCHEMA_DISPLAY_OPTIONS( SCH_EDIT_FRAME* m_galOptionsSizer->Add( m_galOptsPanel, 1, wxEXPAND, 0 ); - m_highlightColorNote->SetFont( KIUI::GetInfoFont( this ) ); + m_highlightColorNote->SetFont( KIUI::GetGUIFont( this, -1 ) ); } diff --git a/include/widgets/ui_common.h b/include/widgets/ui_common.h index b54ed4cf8d..3aa2bab463 100644 --- a/include/widgets/ui_common.h +++ b/include/widgets/ui_common.h @@ -52,9 +52,7 @@ wxSize GetTextSize( const wxString& aSingleLine, wxWindow* aWindow ); wxFont GetMonospacedUIFont(); -wxFont GetControlFont( wxWindow* aWindow ); -wxFont GetInfoFont( wxWindow* aWindow ); -wxFont GetStatusFont( wxWindow* aWindow ); +wxFont GetGUIFont( wxWindow* aWindow, int aRelativeSize = 0 ); /** * Set the minimum pixel width on a text control in order to make a text diff --git a/kicad/kicad_manager_frame.cpp b/kicad/kicad_manager_frame.cpp index d0088b143a..9bef568052 100644 --- a/kicad/kicad_manager_frame.cpp +++ b/kicad/kicad_manager_frame.cpp @@ -126,7 +126,7 @@ KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& titl // Create the status line (bottom of the frame). Left half is for project name; right half // is for Reporter (currently used by archiver/unarchiver). CreateStatusBar( 2 ); - GetStatusBar()->SetFont( KIUI::GetStatusFont( this ) ); + GetStatusBar()->SetFont( KIUI::GetGUIFont( this, -2 ) ); // Give an icon wxIcon icon; diff --git a/kicad/project_tree.cpp b/kicad/project_tree.cpp index 26198fab1d..8ef5402ab9 100644 --- a/kicad/project_tree.cpp +++ b/kicad/project_tree.cpp @@ -49,7 +49,7 @@ PROJECT_TREE::PROJECT_TREE( PROJECT_TREE_PANE* parent ) : m_projectTreePane = parent; // Make sure the GUI font scales properly on GTK - SetFont( KIUI::GetInfoFont( this ) ); + SetFont( KIUI::GetGUIFont( this ) ); // icons size is not know (depending on they are built) // so get it: diff --git a/pagelayout_editor/dialogs/properties_frame.cpp b/pagelayout_editor/dialogs/properties_frame.cpp index e016cc5ffe..9f7f8bccea 100644 --- a/pagelayout_editor/dialogs/properties_frame.cpp +++ b/pagelayout_editor/dialogs/properties_frame.cpp @@ -78,7 +78,7 @@ PROPERTIES_FRAME::PROPERTIES_FRAME( PL_EDITOR_FRAME* aParent ) : m_stcText->SetUseHorizontalScrollBar( false ); m_scintillaTricks = new SCINTILLA_TRICKS( m_stcText, wxT( "{}" ), false ); - m_staticTextSizeInfo->SetFont( KIUI::GetStatusFont( this ) ); + m_staticTextSizeInfo->SetFont( KIUI::GetGUIFont( this, -1 ) ); m_buttonOK->SetDefault(); diff --git a/pcb_calculator/pcb_calculator_frame.cpp b/pcb_calculator/pcb_calculator_frame.cpp index e0ba77b6f9..53686f6e8e 100644 --- a/pcb_calculator/pcb_calculator_frame.cpp +++ b/pcb_calculator/pcb_calculator_frame.cpp @@ -74,7 +74,7 @@ PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) : m_attenuator_list.push_back( new ATTENUATOR_SPLITTER() ); m_currAttenuator = m_attenuator_list[0]; - m_staticTextAttMsg->SetFont( KIUI::GetInfoFont( this ) ); + m_staticTextAttMsg->SetFont( KIUI::GetGUIFont( this, -1 ) ); m_IadjUnitLabel->SetLabel( wxT( "µA" ) ); diff --git a/pcbnew/dialogs/dialog_board_statistics.cpp b/pcbnew/dialogs/dialog_board_statistics.cpp index cc7e03ce42..416a86b354 100644 --- a/pcbnew/dialogs/dialog_board_statistics.cpp +++ b/pcbnew/dialogs/dialog_board_statistics.cpp @@ -91,7 +91,7 @@ DIALOG_BOARD_STATISTICS::DIALOG_BOARD_STATISTICS( PCB_EDIT_FRAME* aParentFrame ) m_checkBoxSubtractHoles->SetValue( s_savedDialogState.subtractHoles ); // Make labels for grids - wxFont headingFont = KIUI::GetInfoFont( this ); + wxFont headingFont = KIUI::GetGUIFont( this, -1 ); m_gridComponents->SetCellValue( ROW_LABEL, COL_FRONT_SIDE, _( "Front Side" ) ); m_gridComponents->SetCellFont( ROW_LABEL, COL_FRONT_SIDE, headingFont ); m_gridComponents->SetCellValue( ROW_LABEL, COL_BOTTOM_SIDE, _( "Back Side" ) ); diff --git a/pcbnew/dialogs/dialog_footprint_properties.cpp b/pcbnew/dialogs/dialog_footprint_properties.cpp index e0554dd3bd..bec230f6bf 100644 --- a/pcbnew/dialogs/dialog_footprint_properties.cpp +++ b/pcbnew/dialogs/dialog_footprint_properties.cpp @@ -109,7 +109,7 @@ DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES( PCB_EDIT_FRAME* aParen m_orientValidator.SetWindow( m_OrientValueCtrl ); // Set font size for items showing long strings: - wxFont infoFont = KIUI::GetInfoFont( this ); + wxFont infoFont = KIUI::GetGUIFont( this, -1 ); #if __WXMAC__ m_allow90Label->SetFont( infoFont ); m_allow180Label->SetFont( infoFont ); diff --git a/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp b/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp index f50b350a64..4ead4641e3 100644 --- a/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp +++ b/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp @@ -100,7 +100,7 @@ DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR( m_FootprintNameCtrl->SetValidator( FOOTPRINT_NAME_VALIDATOR() ); // Set font sizes - wxFont infoFont = KIUI::GetInfoFont( this ); + wxFont infoFont = KIUI::GetGUIFont( this, -1 ); #if __WXMAC__ m_allow90Label->SetFont( infoFont ); m_allow180Label->SetFont( infoFont ); diff --git a/pcbnew/dialogs/dialog_get_footprint_by_name.h b/pcbnew/dialogs/dialog_get_footprint_by_name.h index e177cc7661..33c9ee9bff 100644 --- a/pcbnew/dialogs/dialog_get_footprint_by_name.h +++ b/pcbnew/dialogs/dialog_get_footprint_by_name.h @@ -46,7 +46,7 @@ public: m_sdbSizerOK->SetDefault(); m_choiceFpList->Append( aFpList ); - m_multipleHint->SetFont( KIUI::GetStatusFont( this ) ); + m_multipleHint->SetFont( KIUI::GetGUIFont( this, -1 ) ); // Hide help string until someone implements successive placement (#2227) m_multipleHint->Show( false ); diff --git a/pcbnew/dialogs/dialog_global_edit_text_and_graphics.cpp b/pcbnew/dialogs/dialog_global_edit_text_and_graphics.cpp index 93169a33c0..f1bfba80df 100644 --- a/pcbnew/dialogs/dialog_global_edit_text_and_graphics.cpp +++ b/pcbnew/dialogs/dialog_global_edit_text_and_graphics.cpp @@ -139,7 +139,7 @@ DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS( PCB_ m_LayerCtrl->Resync(); m_grid->SetCellHighlightPenWidth( 0 ); - m_grid->SetDefaultCellFont( KIUI::GetInfoFont( this ) ); + m_grid->SetDefaultCellFont( KIUI::GetGUIFont( this, -1 ) ); m_sdbSizerButtonsOK->SetDefault(); diff --git a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp index bdd4204ba8..ec53417a3a 100644 --- a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp +++ b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp @@ -129,7 +129,7 @@ DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS( PCB_EDIT m_layerBox->SetUndefinedLayerName( INDETERMINATE_ACTION ); m_layerBox->Resync(); - m_netclassGrid->SetDefaultCellFont( KIUI::GetInfoFont( this ) ); + m_netclassGrid->SetDefaultCellFont( KIUI::GetGUIFont( this, -1 ) ); buildNetclassesGrid(); m_netclassGrid->SetCellHighlightPenWidth( 0 ); diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index a2ceacad73..06b48a3f8f 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -205,7 +205,7 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, PAD* aPad initValues(); - wxFont infoFont = KIUI::GetInfoFont( this ); + wxFont infoFont = KIUI::GetGUIFont( this, -1 ); m_copperLayersLabel->SetFont( infoFont ); m_techLayersLabel->SetFont( infoFont ); m_parentInfo->SetFont( infoFont ); diff --git a/pcbnew/dialogs/dialog_text_properties.cpp b/pcbnew/dialogs/dialog_text_properties.cpp index bff335ecca..89e63d3e72 100644 --- a/pcbnew/dialogs/dialog_text_properties.cpp +++ b/pcbnew/dialogs/dialog_text_properties.cpp @@ -131,7 +131,7 @@ DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent, BO m_OrientCtrl->SetString( ii, wxString::Format( "%.1f", rot_list[ii] ) ); // Set font sizes - m_statusLine->SetFont( KIUI::GetStatusFont( this ) ); + m_statusLine->SetFont( KIUI::GetGUIFont( this, -2 ) ); m_sdbSizerOK->SetDefault(); diff --git a/pcbnew/dialogs/panel_fp_editor_defaults.cpp b/pcbnew/dialogs/panel_fp_editor_defaults.cpp index f2215cdce4..c9db2d4fee 100644 --- a/pcbnew/dialogs/panel_fp_editor_defaults.cpp +++ b/pcbnew/dialogs/panel_fp_editor_defaults.cpp @@ -199,7 +199,7 @@ PANEL_FP_EDITOR_DEFAULTS::PANEL_FP_EDITOR_DEFAULTS( FOOTPRINT_EDIT_FRAME* aFrame m_graphicsGrid->PushEventHandler( new GRID_TRICKS( m_graphicsGrid ) ); - m_staticTextInfo->SetFont( KIUI::GetInfoFont( this ) ); + m_staticTextInfo->SetFont( KIUI::GetGUIFont( this, -1 ) ); } diff --git a/pcbnew/dialogs/panel_setup_constraints.cpp b/pcbnew/dialogs/panel_setup_constraints.cpp index 4a12988ffb..5e596b163f 100644 --- a/pcbnew/dialogs/panel_setup_constraints.cpp +++ b/pcbnew/dialogs/panel_setup_constraints.cpp @@ -51,7 +51,7 @@ PANEL_SETUP_CONSTRAINTS::PANEL_SETUP_CONSTRAINTS( PAGED_DIALOG* aParent, PCB_EDI m_Frame = aFrame; m_BrdSettings = &m_Frame->GetBoard()->GetDesignSettings(); - m_stCircleToPolyWarning->SetFont( KIUI::GetInfoFont( this ) ); + m_stCircleToPolyWarning->SetFont( KIUI::GetGUIFont( this, -1 ) ); }