FromDIP the pcb aui sizes

This commit is contained in:
Marek Roszko 2024-01-17 22:02:05 -05:00
parent 7709de3667
commit 7c8ee26a38
2 changed files with 8 additions and 5 deletions

View File

@ -300,17 +300,17 @@ 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 )
.MinSize( 180, -1 ).BestSize( 180, -1 ) );
.MinSize( FromDIP( 180 ), -1 ).BestSize( FromDIP( 180 ), -1 ) );
m_auimgr.AddPane( m_selectionFilterPanel, EDA_PANE().Name( wxS( "SelectionFilter" ) )
.Right().Layer( 4 ).Position( 2 )
.Caption( _( "Selection Filter" ) ).PaneBorder( false )
.MinSize( 180, -1 ).BestSize( 180, -1 ) );
.MinSize( FromDIP( 180 ), -1 ).BestSize( FromDIP( 180 ), -1 ) );
m_auimgr.AddPane( m_propertiesPanel, EDA_PANE().Name( PropertiesPaneName() )
.Left().Layer( 5 )
.Caption( _( "Properties" ) ).PaneBorder( false )
.MinSize( 240, 60 ).BestSize( 300, 200 ) );
.MinSize( FromDIP( wxSize( 240, 60 ) ) ).BestSize( FromDIP( wxSize( 300, 200 ) ) ) );
// Center
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( wxS( "DrawFrame" ) )
@ -319,8 +319,8 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_auimgr.AddPane( m_searchPane, EDA_PANE().Name( SearchPaneName() )
.Bottom()
.Caption( _( "Search" ) ).PaneBorder( false )
.MinSize( 180, 60 ).BestSize( 180, 100 )
.FloatingSize( 480, 200 )
.MinSize( FromDIP( wxSize ( 180, 60 ) ) ).BestSize( FromDIP( wxSize ( 180, 100 ) ) )
.FloatingSize( FromDIP( wxSize( 480, 200 ) ) )
.CloseButton( true )
.DestroyOnClose( false ) );

View File

@ -406,6 +406,9 @@ APPEARANCE_CONTROLS::APPEARANCE_CONTROLS( PCB_BASE_FRAME* aParent, wxWindow* aFo
m_lastSelectedUserPreset( nullptr ),
m_layerContextMenu( nullptr )
{
// Correct the min size from wxformbuilder not using fromdip
SetMinSize( FromDIP( GetMinSize() ) );
DPI_SCALING_COMMON dpi( nullptr, m_frame );
int indicatorSize = ConvertDialogToPixels( wxSize( 6, 6 ) ).x / dpi.GetContentScaleFactor();