More wxTextCtrl minimum widths.

This commit is contained in:
Jeff Young 2022-12-14 23:21:15 +00:00
parent a2ba9137b8
commit 93879532f7
2 changed files with 6 additions and 1 deletions

View File

@ -40,7 +40,7 @@ PANEL_SETUP_FORMATTING::PANEL_SETUP_FORMATTING( wxWindow* aWindow, SCH_EDIT_FRAM
m_pinSymbolSize( aFrame, m_pinSymbolSizeLabel, m_pinSymbolSizeCtrl, m_pinSymbolSizeUnits )
{
wxSize minSize = m_dashLengthCtrl->GetMinSize();
int minWidth = m_dashLengthCtrl->GetTextExtent( wxT( "XX.XXX" ) ).GetWidth();
int minWidth = m_dashLengthCtrl->GetTextExtent( wxT( "XXX.XXX" ) ).GetWidth();
m_dashLengthCtrl->SetMinSize( wxSize( minWidth, minSize.GetHeight() ) );
m_gapLengthCtrl->SetMinSize( wxSize( minWidth, minSize.GetHeight() ) );

View File

@ -34,6 +34,11 @@ PANEL_SETUP_FORMATTING::PANEL_SETUP_FORMATTING( PAGED_DIALOG* aParent, PCB_EDIT_
PANEL_SETUP_FORMATTING_BASE( aParent->GetTreebook() ),
m_frame( aFrame )
{
wxSize minSize = m_dashLengthCtrl->GetMinSize();
int minWidth = m_dashLengthCtrl->GetTextExtent( wxT( "XXX.XXX" ) ).GetWidth();
m_dashLengthCtrl->SetMinSize( wxSize( minWidth, minSize.GetHeight() ) );
m_gapLengthCtrl->SetMinSize( wxSize( minWidth, minSize.GetHeight() ) );
}