DIALOG_FOOTPRINT_CHOOSER: fix some min sizes to avoid not visible widgets.

From master branch
This commit is contained in:
jean-pierre charras
2024-07-28 12:28:27 +02:00
parent 396e531e7c
commit 16dee8608b
2 changed files with 8 additions and 2 deletions
+6 -1
View File
@@ -50,7 +50,9 @@ DIALOG_FOOTPRINT_CHOOSER::DIALOG_FOOTPRINT_CHOOSER( PCB_BASE_FRAME* aParent,
m_parent = aParent;
m_showFpMode = true;
// This is also the main sizer:
wxBoxSizer* m_SizerTop = new wxBoxSizer( wxVERTICAL );
m_chooserPanel = new PANEL_FOOTPRINT_CHOOSER( aParent, this, aFootprintHistoryList,
// Filter
[]( LIB_TREE_NODE& aNode ) -> bool
@@ -68,7 +70,7 @@ DIALOG_FOOTPRINT_CHOOSER::DIALOG_FOOTPRINT_CHOOSER( PCB_BASE_FRAME* aParent,
EndModal( wxID_CANCEL );
} );
m_SizerTop->Add( m_chooserPanel, 1, wxEXPAND, 5 );
m_SizerTop->Add( m_chooserPanel, 1, wxEXPAND | wxRIGHT, 5 );
FOOTPRINT_PREVIEW_WIDGET* viewerFpPanel = m_chooserPanel->GetViewerPanel();
viewerFpPanel->Show( m_showFpMode );
@@ -77,6 +79,7 @@ DIALOG_FOOTPRINT_CHOOSER::DIALOG_FOOTPRINT_CHOOSER( PCB_BASE_FRAME* aParent,
m_preview3DCanvas->Show( !m_showFpMode );
// bSizerBottom shows all buttons to the bottom of window
wxBoxSizer* bSizerBottom;
bSizerBottom = new wxBoxSizer( wxHORIZONTAL );
// Add a spacer on the left
@@ -120,6 +123,8 @@ DIALOG_FOOTPRINT_CHOOSER::DIALOG_FOOTPRINT_CHOOSER( PCB_BASE_FRAME* aParent,
SetupStandardButtons();
m_chooserPanel->FinishSetup();
// Ensure a reasonable min size that shows all widgets in this dialog
SetMinSize( wxSize( 400, 300 ) );
Layout();
// Connect Events
+2 -1
View File
@@ -127,7 +127,8 @@ PANEL_FOOTPRINT_CHOOSER::PANEL_FOOTPRINT_CHOOSER( PCB_BASE_FRAME* aFrame, wxTopL
detailsSizer->Fit( detailsPanel );
m_vsplitter->SetSashGravity( 0.5 );
m_vsplitter->SetMinimumPaneSize( 20 );
// Ensure the splitted areas are always shown (i.e. 0 size not allowed)
m_vsplitter->SetMinimumPaneSize( 80 ); // arbitrary value but reasonable min size
m_vsplitter->SplitHorizontally( m_hsplitter, detailsPanel );
sizer->Add( m_vsplitter, 1, wxEXPAND | wxALL, 5 );