From 0e5155ae2f5e2395567ac4b043b5cb3d235c845d Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Mon, 22 May 2023 08:53:18 -0400 Subject: [PATCH] Fix clipped combobox entry in board editor text box dialog. The layer combobox color swatch was clipped when the combobox was closed when the dialog was launched. Setting the minimum width resolved the issue. This may have been a GTK only issue. (cherry picked from commit a13a49f45a5f1fbef77877689c3ae95bbd222825) --- pcbnew/dialogs/dialog_textbox_properties_base.cpp | 4 +++- pcbnew/dialogs/dialog_textbox_properties_base.fbp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pcbnew/dialogs/dialog_textbox_properties_base.cpp b/pcbnew/dialogs/dialog_textbox_properties_base.cpp index 298ce3cdea..f1f10d0ffd 100644 --- a/pcbnew/dialogs/dialog_textbox_properties_base.cpp +++ b/pcbnew/dialogs/dialog_textbox_properties_base.cpp @@ -66,7 +66,7 @@ DIALOG_TEXTBOX_PROPERTIES_BASE::DIALOG_TEXTBOX_PROPERTIES_BASE( wxWindow* parent bMainSizer->Add( m_MultiLineSizer, 20, wxEXPAND|wxALL, 10 ); wxGridBagSizer* gbSizer1; - gbSizer1 = new wxGridBagSizer( 2, 3 ); + gbSizer1 = new wxGridBagSizer( 3, 3 ); gbSizer1->SetFlexibleDirection( wxBOTH ); gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); gbSizer1->SetEmptyCellSize( wxSize( -1,8 ) ); @@ -79,6 +79,8 @@ DIALOG_TEXTBOX_PROPERTIES_BASE::DIALOG_TEXTBOX_PROPERTIES_BASE( wxWindow* parent gbSizer1->Add( m_LayerLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); m_LayerSelectionCtrl = new PCB_LAYER_BOX_SELECTOR( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + m_LayerSelectionCtrl->SetMinSize( wxSize( 175,-1 ) ); + gbSizer1->Add( m_LayerSelectionCtrl, wxGBPosition( 1, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); m_fontLabel = new wxStaticText( this, wxID_ANY, _("Font:"), wxDefaultPosition, wxDefaultSize, 0 ); diff --git a/pcbnew/dialogs/dialog_textbox_properties_base.fbp b/pcbnew/dialogs/dialog_textbox_properties_base.fbp index ce3b0d88d2..c2e8a695a7 100644 --- a/pcbnew/dialogs/dialog_textbox_properties_base.fbp +++ b/pcbnew/dialogs/dialog_textbox_properties_base.fbp @@ -216,7 +216,7 @@ gbSizer1 wxFLEX_GROWMODE_SPECIFIED none - 2 + 3 5 3 @@ -389,7 +389,7 @@ 0 - + 175,-1 1 m_LayerSelectionCtrl 1