From 9c051a81388acc79422365aaafb8f08173775525 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 8 Aug 2025 09:52:39 +0200 Subject: [PATCH] DIALOG_TEMPLATE_SELECTOR: fix a panel min size. A min size panel was already set, but for some reason did not work. Setting the min size of the sizer containing this panel works better. --- kicad/dialogs/dialog_template_selector_base.cpp | 14 +++++++------- kicad/dialogs/dialog_template_selector_base.fbp | 6 +++--- kicad/dialogs/dialog_template_selector_base.h | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/kicad/dialogs/dialog_template_selector_base.cpp b/kicad/dialogs/dialog_template_selector_base.cpp index 7bf446c290..b6c8fd1664 100644 --- a/kicad/dialogs/dialog_template_selector_base.cpp +++ b/kicad/dialogs/dialog_template_selector_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6a-dirty) +// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -38,20 +38,21 @@ DIALOG_TEMPLATE_SELECTOR_BASE::DIALOG_TEMPLATE_SELECTOR_BASE( wxWindow* parent, bmainSizer->Add( bsizerTemplateSelector, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 ); - wxBoxSizer* bSizer6; - bSizer6 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizerNotebook; + bSizerNotebook = new wxBoxSizer( wxVERTICAL ); + bSizerNotebook->SetMinSize( wxSize( 700,400 ) ); m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); - bSizer6->Add( m_notebook, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + bSizerNotebook->Add( m_notebook, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); m_webviewPanel = new WEBVIEW_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); m_webviewPanel->SetMinSize( wxSize( 700,300 ) ); - bSizer6->Add( m_webviewPanel, 1, wxEXPAND | wxALL, 5 ); + bSizerNotebook->Add( m_webviewPanel, 1, wxEXPAND | wxALL, 5 ); - bmainSizer->Add( bSizer6, 1, wxEXPAND, 5 ); + bmainSizer->Add( bSizerNotebook, 1, wxEXPAND, 5 ); m_sdbSizer = new wxStdDialogButtonSizer(); m_sdbSizerOK = new wxButton( this, wxID_OK ); @@ -65,7 +66,6 @@ DIALOG_TEMPLATE_SELECTOR_BASE::DIALOG_TEMPLATE_SELECTOR_BASE( wxWindow* parent, this->SetSizer( bmainSizer ); this->Layout(); - bmainSizer->Fit( this ); this->Centre( wxBOTH ); diff --git a/kicad/dialogs/dialog_template_selector_base.fbp b/kicad/dialogs/dialog_template_selector_base.fbp index 2be002eaa1..b390249858 100644 --- a/kicad/dialogs/dialog_template_selector_base.fbp +++ b/kicad/dialogs/dialog_template_selector_base.fbp @@ -50,7 +50,7 @@ -1,-1 DIALOG_TEMPLATE_SELECTOR_BASE - -1,-1 + 513,523 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h Project Template Selector @@ -357,8 +357,8 @@ wxEXPAND 1 - - bSizer6 + 700,400 + bSizerNotebook wxVERTICAL none diff --git a/kicad/dialogs/dialog_template_selector_base.h b/kicad/dialogs/dialog_template_selector_base.h index 4f21380ea7..6c6e411b8f 100644 --- a/kicad/dialogs/dialog_template_selector_base.h +++ b/kicad/dialogs/dialog_template_selector_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6a-dirty) +// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -61,7 +61,7 @@ class DIALOG_TEMPLATE_SELECTOR_BASE : public DIALOG_SHIM public: - DIALOG_TEMPLATE_SELECTOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Project Template Selector"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_TEMPLATE_SELECTOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Project Template Selector"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 513,523 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_TEMPLATE_SELECTOR_BASE();