diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index 79d1dfb265..8c2d503687 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/pcbnew/pcb_edit_frame.cpp @@ -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 ) ); diff --git a/pcbnew/widgets/appearance_controls.cpp b/pcbnew/widgets/appearance_controls.cpp index 29f659d9c1..1bf0bbea58 100644 --- a/pcbnew/widgets/appearance_controls.cpp +++ b/pcbnew/widgets/appearance_controls.cpp @@ -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();