From d945b76c657a198fd06d0da901fff08f8f6965e6 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 5 Jun 2023 15:14:10 +0300 Subject: [PATCH] Center calculator grid cells, sync font styles with fbp. Fixes https://gitlab.com/kicad/code/kicad/-/issues/14743 --- pcb_calculator/calculator_panels/panel_board_class_base.cpp | 4 ++-- pcb_calculator/calculator_panels/panel_board_class_base.fbp | 2 +- .../calculator_panels/panel_electrical_spacing_base.cpp | 6 +++--- .../calculator_panels/panel_electrical_spacing_base.fbp | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pcb_calculator/calculator_panels/panel_board_class_base.cpp b/pcb_calculator/calculator_panels/panel_board_class_base.cpp index 4233a0e845..649a48fcfe 100644 --- a/pcb_calculator/calculator_panels/panel_board_class_base.cpp +++ b/pcb_calculator/calculator_panels/panel_board_class_base.cpp @@ -32,7 +32,7 @@ PANEL_BOARD_CLASS_BASE::PANEL_BOARD_CLASS_BASE( wxWindow* parent, wxWindowID id, m_staticTextBrdClass = new wxStaticText( this, wxID_ANY, _("Note: Values are minimal values"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextBrdClass->Wrap( -1 ); - m_staticTextBrdClass->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); + m_staticTextBrdClass->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); brdclsSizerRight->Add( m_staticTextBrdClass, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); @@ -81,7 +81,7 @@ PANEL_BOARD_CLASS_BASE::PANEL_BOARD_CLASS_BASE( wxWindow* parent, wxWindowID id, // Label Appearance // Cell Defaults - m_gridClassesValuesDisplay->SetDefaultCellAlignment( wxALIGN_CENTER, wxALIGN_TOP ); + m_gridClassesValuesDisplay->SetDefaultCellAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); brdclsSizerRight->Add( m_gridClassesValuesDisplay, 0, wxALL, 5 ); m_panelShowClassPrms = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); diff --git a/pcb_calculator/calculator_panels/panel_board_class_base.fbp b/pcb_calculator/calculator_panels/panel_board_class_base.fbp index b7da98846e..15d00b2ebb 100644 --- a/pcb_calculator/calculator_panels/panel_board_class_base.fbp +++ b/pcb_calculator/calculator_panels/panel_board_class_base.fbp @@ -226,7 +226,7 @@ wxALIGN_CENTER - wxALIGN_TOP + wxALIGN_CENTER 0 1 wxALIGN_CENTER diff --git a/pcb_calculator/calculator_panels/panel_electrical_spacing_base.cpp b/pcb_calculator/calculator_panels/panel_electrical_spacing_base.cpp index 107c8dadf4..30d276470f 100644 --- a/pcb_calculator/calculator_panels/panel_electrical_spacing_base.cpp +++ b/pcb_calculator/calculator_panels/panel_electrical_spacing_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.0-4761b0c5) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -46,7 +46,7 @@ PANEL_ELECTRICAL_SPACING_BASE::PANEL_ELECTRICAL_SPACING_BASE( wxWindow* parent, m_staticTextElectricalSpacing = new wxStaticText( this, wxID_ANY, _("Note: Values are minimal values (from IPC 2221)"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextElectricalSpacing->Wrap( -1 ); - m_staticTextElectricalSpacing->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); + m_staticTextElectricalSpacing->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); m_electricalSpacingSizer->Add( m_staticTextElectricalSpacing, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 ); @@ -107,7 +107,7 @@ PANEL_ELECTRICAL_SPACING_BASE::PANEL_ELECTRICAL_SPACING_BASE( wxWindow* parent, // Label Appearance // Cell Defaults - m_gridElectricalSpacingValues->SetDefaultCellAlignment( wxALIGN_CENTER, wxALIGN_TOP ); + m_gridElectricalSpacingValues->SetDefaultCellAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); m_electricalSpacingSizer->Add( m_gridElectricalSpacingValues, 0, wxALL, 5 ); m_staticText88 = new wxStaticText( this, wxID_ANY, _("* B1 - Internal Conductors\n* B2 - External Conductors, uncoated, sea level to 3050 m\n* B3 - External Conductors, uncoated, over 3050 m\n* B4 - External Conductors, with permanent polymer coating (any elevation)\n* A5 - External Conductors, with conformal coating over assembly (any elevation)\n* A6 - External Component lead/termination, uncoated\n* A7 - External Component lead termination, with conformal coating (any elevation)"), wxDefaultPosition, wxDefaultSize, 0 ); diff --git a/pcb_calculator/calculator_panels/panel_electrical_spacing_base.fbp b/pcb_calculator/calculator_panels/panel_electrical_spacing_base.fbp index aef03779ea..a8fb085432 100644 --- a/pcb_calculator/calculator_panels/panel_electrical_spacing_base.fbp +++ b/pcb_calculator/calculator_panels/panel_electrical_spacing_base.fbp @@ -95,7 +95,7 @@ 1 1 - ,90,91,-1,70,0 + ,90,90,-1,70,0 0 0 wxID_ANY @@ -483,7 +483,7 @@ wxALIGN_CENTER - wxALIGN_TOP + wxALIGN_CENTER 0 1 wxALIGN_CENTER