From f53c2e17a976b345b53afdf8ffbbe4804f0b4397 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 9 Feb 2026 14:04:38 +0000 Subject: [PATCH] Rework of 0970fb8b. SetMinSize( ..., -1 ) still required for non-growable panels. --- eeschema/eeschema_settings.cpp | 1 + eeschema/symbol_editor/symbol_edit_frame.cpp | 4 +++- gerbview/gerbview_frame.cpp | 8 +++++--- pcbnew/footprint_edit_frame.cpp | 12 +++++++++--- pcbnew/pcb_edit_frame.cpp | 4 +++- 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/eeschema/eeschema_settings.cpp b/eeschema/eeschema_settings.cpp index 03cd2faadb..0bc1e2dd23 100644 --- a/eeschema/eeschema_settings.cpp +++ b/eeschema/eeschema_settings.cpp @@ -119,6 +119,7 @@ const wxAuiPaneInfo& defaultSchSelectionFilterPaneInfo( wxWindow* aWindow ) .TopDockable( false ) .BottomDockable( false ) .CloseButton( true ) + // Fixed-size pane; -1 for MinSize height is required .MinSize( aWindow->FromDIP( wxSize( 180, -1 ) ) ) .BestSize( aWindow->FromDIP( wxSize( 180, -1 ) ) ) .Show( true ); diff --git a/eeschema/symbol_editor/symbol_edit_frame.cpp b/eeschema/symbol_editor/symbol_edit_frame.cpp index ce6c81d417..186a04c770 100644 --- a/eeschema/symbol_editor/symbol_edit_frame.cpp +++ b/eeschema/symbol_editor/symbol_edit_frame.cpp @@ -215,7 +215,9 @@ SYMBOL_EDIT_FRAME::SYMBOL_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : .Left().Layer( 3 ) .TopDockable( false ).BottomDockable( false ) .Caption( _( "Libraries" ) ) - .MinSize( FromDIP( 250 ), -1 ).BestSize( FromDIP( 250 ), -1 ) ); + // Don't use -1 for don't-change-height on a growable panel; it has side-effects. + .MinSize( FromDIP( 250 ), FromDIP( 80 ) ) + .BestSize( FromDIP( 250 ), -1 ) ); m_auimgr.AddPane( m_propertiesPanel, defaultPropertiesPaneInfo( this ) ); m_auimgr.AddPane( m_selectionFilterPanel, defaultSchSelectionFilterPaneInfo( this ) ); diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp index 3c5c903f02..ff61940b57 100644 --- a/gerbview/gerbview_frame.cpp +++ b/gerbview/gerbview_frame.cpp @@ -164,9 +164,11 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ) : m_auimgr.AddPane( m_tbTopAux, EDA_PANE().HToolbar().Name( "TopAuxToolbar" ).Top().Layer(4) ); m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" ).Bottom().Layer( 6 ) ); m_auimgr.AddPane( m_tbLeft, EDA_PANE().VToolbar().Name( "LeftToolbar" ).Left().Layer( 3 ) ); - m_auimgr.AddPane( m_LayersManager, EDA_PANE().Palette().Name( "LayersManager" ).Right().Layer( 3 ) - .Caption( _( "Layers Manager" ) ).PaneBorder( false ) - .MinSize( 80, -1 ).BestSize( m_LayersManager->GetBestSize() ) ); + m_auimgr.AddPane( m_LayersManager, + EDA_PANE().Palette().Name( "LayersManager" ).Right().Layer( 3 ) + .Caption( _( "Layers Manager" ) ).PaneBorder( false ) + .MinSize( FromDIP( 80 ), FromDIP( 80 ) ) + .BestSize( m_LayersManager->GetBestSize() ) ); m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( "DrawFrame" ).Center() ); diff --git a/pcbnew/footprint_edit_frame.cpp b/pcbnew/footprint_edit_frame.cpp index 58a3b05f6c..bd5f096202 100644 --- a/pcbnew/footprint_edit_frame.cpp +++ b/pcbnew/footprint_edit_frame.cpp @@ -226,7 +226,9 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : m_auimgr.AddPane( m_treePane, EDA_PANE().Palette().Name( "Footprints" ) .Left().Layer( 4 ) .Caption( _( "Libraries" ) ) - .MinSize( FromDIP( 250 ), -1 ).BestSize( FromDIP( 250 ), -1 ) ); + // Don't use -1 for don't-change-height on a growable panel; it has side-effects. + .MinSize( FromDIP( 250 ), FromDIP( 80 ) ) + .BestSize( FromDIP( 250 ), -1 ) ); m_auimgr.AddPane( m_propertiesPanel, EDA_PANE().Name( PropertiesPaneName() ) .Left().Layer( 3 ) .Caption( _( "Properties" ) ).PaneBorder( false ) @@ -239,11 +241,15 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : m_auimgr.AddPane( m_appearancePanel, EDA_PANE().Name( "LayersManager" ) .Right().Layer( 3 ) .Caption( _( "Appearance" ) ).PaneBorder( false ) - .MinSize( FromDIP( 180 ), -1 ).BestSize( FromDIP( 180 ), -1 ) ); + // Don't use -1 for don't-change-height on a growable panel; it has side-effects. + .MinSize( FromDIP( 180 ), FromDIP( 80 ) ) + .BestSize( FromDIP( 180 ), -1 ) ); m_auimgr.AddPane( m_selectionFilterPanel, EDA_PANE().Palette().Name( "SelectionFilter" ) .Right().Layer( 3 ).Position( 2 ) .Caption( _( "Selection Filter" ) ).PaneBorder( false ) - .MinSize( FromDIP( 180 ), -1 ).BestSize( FromDIP( 180 ), -1 ) ); + // Fixed-size pane; -1 for MinSize height is required + .MinSize( FromDIP( 180 ), -1 ) + .BestSize( FromDIP( 180 ), -1 ) ); // Center m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( "DrawFrame" ) diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index e1771ea06f..e7380c3c63 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/pcbnew/pcb_edit_frame.cpp @@ -323,6 +323,7 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : m_auimgr.AddPane( m_appearancePanel, EDA_PANE().Name( wxS( "LayersManager" ) ) .Right().Layer( 4 ) .Caption( _( "Appearance" ) ).PaneBorder( false ) + // Don't use -1 for don't-change-height on a growable panel; it has side-effects. .MinSize( m_appearancePanel->GetMinSize().x, FromDIP( 60 ) ) #ifdef __WXMAC__ // Best size for this pane is calculated larger than necessary on wxMac @@ -336,7 +337,8 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : m_auimgr.AddPane( m_selectionFilterPanel, EDA_PANE().Name( wxS( "SelectionFilter" ) ) .Right().Layer( 4 ).Position( 2 ) .Caption( _( "Selection Filter" ) ).PaneBorder( false ) - .MinSize( m_selectionFilterPanel->GetMinSize().x, FromDIP( 60 ) ) + // Fixed-size pane; -1 for MinSize height is required + .MinSize( m_selectionFilterPanel->GetMinSize().x, -1 ) .BestSize( m_selectionFilterPanel->GetBestSize().x, -1 ) .FloatingSize( m_selectionFilterPanel->GetBestSize() ) .CloseButton( false ) );