Fixup a few more collapsing textEditCtrls on Mac.

This commit is contained in:
Jeff Young 2022-12-14 15:10:25 +00:00
parent 756db0d542
commit 5984a6dddd
5 changed files with 26 additions and 6 deletions

View File

@ -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() ) );
}

View File

@ -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() );
}

View File

@ -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 );

View File

@ -1729,7 +1729,7 @@
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<property name="proportion">1</property>
<object class="wxTextCtrl" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
@ -1764,7 +1764,7 @@
<property name="maxlength"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="minimum_size">160,-1</property>
<property name="moveable">1</property>
<property name="name">m_prefixCtrl</property>
<property name="pane_border">1</property>
@ -1854,7 +1854,7 @@
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<property name="proportion">1</property>
<object class="wxTextCtrl" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
@ -1889,7 +1889,7 @@
<property name="maxlength"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="minimum_size">160,-1</property>
<property name="moveable">1</property>
<property name="name">m_suffixCtrl</property>
<property name="pane_border">1</property>

View File

@ -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() );
}