diff --git a/pcbnew/dialogs/dialog_footprint_chooser.cpp b/pcbnew/dialogs/dialog_footprint_chooser.cpp index a4de1f5c1d..2e24a8cd36 100644 --- a/pcbnew/dialogs/dialog_footprint_chooser.cpp +++ b/pcbnew/dialogs/dialog_footprint_chooser.cpp @@ -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 diff --git a/pcbnew/widgets/panel_footprint_chooser.cpp b/pcbnew/widgets/panel_footprint_chooser.cpp index 8b0b9a683b..c1895469ca 100644 --- a/pcbnew/widgets/panel_footprint_chooser.cpp +++ b/pcbnew/widgets/panel_footprint_chooser.cpp @@ -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 );