mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 17:03:44 +00:00
DIALOG_FOOTPRINT_CHOOSER: fix some min sizes to avoid not visible widgets.
This commit is contained in:
parent
377b9aa859
commit
393f1c1ad2
pcbnew
@ -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 );
|
||||
|
||||
@ -125,6 +128,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
|
||||
|
@ -128,7 +128,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, 5 );
|
||||
@ -144,7 +145,7 @@ PANEL_FOOTPRINT_CHOOSER::PANEL_FOOTPRINT_CHOOSER( PCB_BASE_FRAME* aFrame, wxTopL
|
||||
|
||||
m_preview_ctrl = new FOOTPRINT_PREVIEW_WIDGET( m_RightPanel, m_frame->Kiway() );
|
||||
m_preview_ctrl->SetUserUnits( m_frame->GetUserUnits() );
|
||||
m_RightPanelSizer->Add( m_preview_ctrl, 1, wxEXPAND, 5 );
|
||||
m_RightPanelSizer->Add( m_preview_ctrl, 1, wxEXPAND|wxRIGHT, 5 );
|
||||
|
||||
m_RightPanel->SetSizer( m_RightPanelSizer );
|
||||
m_RightPanel->Layout();
|
||||
|
Loading…
Reference in New Issue
Block a user