diff --git a/common/dialogs/panel_common_settings.cpp b/common/dialogs/panel_common_settings.cpp index b70fb051b2..c4f8f85d25 100644 --- a/common/dialogs/panel_common_settings.cpp +++ b/common/dialogs/panel_common_settings.cpp @@ -189,6 +189,11 @@ PANEL_COMMON_SETTINGS::PANEL_COMMON_SETTINGS( DIALOG_SHIM* aDialog, wxWindow* aP wxCommandEventHandler( PANEL_COMMON_SETTINGS::OnCanvasScaleChange ), nullptr, this ); } + + wxSize minSize = m_highContrastCtrl->GetMinSize(); + int minWidth = m_highContrastCtrl->GetTextExtent( wxT( "XXX.XXX" ) ).GetWidth(); + + m_highContrastCtrl->SetMinSize( wxSize( minWidth, minSize.GetHeight() ) ); } diff --git a/eeschema/dialogs/panel_setup_formatting.cpp b/eeschema/dialogs/panel_setup_formatting.cpp index d97eea1168..f082420912 100644 --- a/eeschema/dialogs/panel_setup_formatting.cpp +++ b/eeschema/dialogs/panel_setup_formatting.cpp @@ -39,6 +39,12 @@ PANEL_SETUP_FORMATTING::PANEL_SETUP_FORMATTING( wxWindow* aWindow, SCH_EDIT_FRAM m_lineWidth( aFrame, m_lineWidthLabel, m_lineWidthCtrl, m_lineWidthUnits ), m_pinSymbolSize( aFrame, m_pinSymbolSizeLabel, m_pinSymbolSizeCtrl, m_pinSymbolSizeUnits ) { + wxSize minSize = m_dashLengthCtrl->GetMinSize(); + int minWidth = m_dashLengthCtrl->GetTextExtent( wxT( "XX.XXX" ) ).GetWidth(); + + m_dashLengthCtrl->SetMinSize( wxSize( minWidth, minSize.GetHeight() ) ); + m_gapLengthCtrl->SetMinSize( wxSize( minWidth, minSize.GetHeight() ) ); + m_dashedLineHelp->SetFont( KIUI::GetInfoFont( this ).Italic() ); } diff --git a/eeschema/dialogs/panel_setup_formatting_base.cpp b/eeschema/dialogs/panel_setup_formatting_base.cpp index a159cdde27..28cd270979 100644 --- a/eeschema/dialogs/panel_setup_formatting_base.cpp +++ b/eeschema/dialogs/panel_setup_formatting_base.cpp @@ -195,14 +195,18 @@ PANEL_SETUP_FORMATTING_BASE::PANEL_SETUP_FORMATTING_BASE( wxWindow* parent, wxWi fgSizer4->Add( m_prefixLabel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_prefixCtrl = new wxTextCtrl( sbSizerIREf->GetStaticBox(), wxID_ANY, _("["), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer4->Add( m_prefixCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_prefixCtrl->SetMinSize( wxSize( 160,-1 ) ); + + fgSizer4->Add( m_prefixCtrl, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_suffixLabel = new wxStaticText( sbSizerIREf->GetStaticBox(), wxID_ANY, _("Suffix:"), wxDefaultPosition, wxDefaultSize, 0 ); m_suffixLabel->Wrap( -1 ); fgSizer4->Add( m_suffixLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_suffixCtrl = new wxTextCtrl( sbSizerIREf->GetStaticBox(), wxID_ANY, _("]"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer4->Add( m_suffixCtrl, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_suffixCtrl->SetMinSize( wxSize( 160,-1 ) ); + + fgSizer4->Add( m_suffixCtrl, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bSizerMargins->Add( fgSizer4, 1, wxEXPAND, 5 ); diff --git a/eeschema/dialogs/panel_setup_formatting_base.fbp b/eeschema/dialogs/panel_setup_formatting_base.fbp index 6278d4bec4..e36f540b28 100644 --- a/eeschema/dialogs/panel_setup_formatting_base.fbp +++ b/eeschema/dialogs/panel_setup_formatting_base.fbp @@ -1729,7 +1729,7 @@ 5 wxALL|wxALIGN_CENTER_VERTICAL - 0 + 1 1 1 @@ -1764,7 +1764,7 @@ 0 - + 160,-1 1 m_prefixCtrl 1 @@ -1854,7 +1854,7 @@ 5 wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT - 0 + 1 1 1 @@ -1889,7 +1889,7 @@ 0 - + 160,-1 1 m_suffixCtrl 1 diff --git a/kicad/pcm/dialogs/panel_pcm_settings.cpp b/kicad/pcm/dialogs/panel_pcm_settings.cpp index 4a7b352d30..e35a016434 100644 --- a/kicad/pcm/dialogs/panel_pcm_settings.cpp +++ b/kicad/pcm/dialogs/panel_pcm_settings.cpp @@ -31,6 +31,11 @@ PANEL_PCM_SETTINGS::PANEL_PCM_SETTINGS( wxWindow* parent ) : PANEL_PCM_SETTINGS_BASE( parent ) { + wxSize minSize = m_libPrefix->GetMinSize(); + int minWidth = m_libPrefix->GetTextExtent( wxT( "XXX.XXX" ) ).GetWidth(); + + m_libPrefix->SetMinSize( wxSize( minWidth, minSize.GetHeight() ) ); + m_libHelp->SetFont( KIUI::GetInfoFont( this ).Italic() ); }