mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 00:21:25 +00:00
Add some closebuttons to pcbnew panes
This commit is contained in:
parent
85413e2c9b
commit
659228de2d
@ -419,6 +419,8 @@ public:
|
||||
|
||||
static const wxString DesignBlocksPaneName() { return wxS( "DesignBlocks" ); }
|
||||
|
||||
static const wxString AppearancePanelName() { return wxS( "LayersManager" ); }
|
||||
|
||||
/**
|
||||
* Fetch an item by KIID. Frame-type-specific implementation.
|
||||
*/
|
||||
|
@ -322,17 +322,26 @@ 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( FromDIP( 180 ), -1 ).BestSize( FromDIP( 180 ), -1 ) );
|
||||
.MinSize( FromDIP( 180 ), -1 )
|
||||
.BestSize( FromDIP( 180 ), -1 )
|
||||
.FloatingSize( FromDIP( 180 ), -1 )
|
||||
.CloseButton( false ) );
|
||||
|
||||
m_auimgr.AddPane( m_selectionFilterPanel, EDA_PANE().Name( wxS( "SelectionFilter" ) )
|
||||
.Right().Layer( 4 ).Position( 2 )
|
||||
.Caption( _( "Selection Filter" ) ).PaneBorder( false )
|
||||
.MinSize( FromDIP( 180 ), -1 ).BestSize( FromDIP( 180 ), -1 ) );
|
||||
.MinSize( FromDIP( 180 ), -1 )
|
||||
.BestSize( FromDIP( 180 ), -1 )
|
||||
.FloatingSize( FromDIP( 180 ), -1 )
|
||||
.CloseButton( false ) );
|
||||
|
||||
m_auimgr.AddPane( m_propertiesPanel, EDA_PANE().Name( PropertiesPaneName() )
|
||||
.Left().Layer( 5 )
|
||||
.Caption( _( "Properties" ) ).PaneBorder( false )
|
||||
.MinSize( FromDIP( wxSize( 240, 60 ) ) ).BestSize( FromDIP( wxSize( 300, 200 ) ) ) );
|
||||
.MinSize( FromDIP( wxSize( 240, 60 ) ) )
|
||||
.BestSize( FromDIP( wxSize( 300, 200 ) ) )
|
||||
.FloatingSize( wxSize( 300, 200 ) )
|
||||
.CloseButton( true ) );
|
||||
|
||||
// Center
|
||||
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( wxS( "DrawFrame" ) )
|
||||
@ -344,14 +353,18 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||
.Caption( _( "Net Inspector" ) )
|
||||
.PaneBorder( false )
|
||||
.MinSize( FromDIP( wxSize( 240, 60 ) ) )
|
||||
.BestSize( FromDIP( wxSize( 300, 200 ) ) ) );
|
||||
.BestSize( FromDIP( wxSize( 300, 200 ) ) )
|
||||
.FloatingSize( wxSize( 300, 200 ) )
|
||||
.CloseButton( true ) );
|
||||
|
||||
m_auimgr.AddPane( m_searchPane, EDA_PANE().Name( SearchPaneName() )
|
||||
.Bottom()
|
||||
.Caption( _( "Search" ) ).PaneBorder( false )
|
||||
.MinSize( FromDIP( wxSize ( 180, 60 ) ) ).BestSize( FromDIP( wxSize ( 180, 100 ) ) )
|
||||
.MinSize( FromDIP( wxSize ( 180, 60 ) ) )
|
||||
.BestSize( FromDIP( wxSize ( 180, 100 ) ) )
|
||||
.FloatingSize( FromDIP( wxSize( 480, 200 ) ) )
|
||||
.DestroyOnClose( false ) );
|
||||
.DestroyOnClose( false )
|
||||
.CloseButton( true ) );
|
||||
|
||||
|
||||
m_auimgr.GetPane( "LayersManager" ).Show( m_show_layer_manager_tools );
|
||||
@ -1420,7 +1433,8 @@ void PCB_EDIT_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
|
||||
|
||||
if( cfg )
|
||||
{
|
||||
cfg->m_AuiPanels.show_layer_manager = m_show_layer_manager_tools;
|
||||
wxAuiPaneInfo& apperancePane = m_auimgr.GetPane( AppearancePanelName() );
|
||||
cfg->m_AuiPanels.show_layer_manager = apperancePane.IsShown();
|
||||
|
||||
if( m_propertiesPanel )
|
||||
{
|
||||
|
@ -696,10 +696,12 @@ void PCB_EDIT_FRAME::ReCreateLayerBox( bool aForceResizeToolbar )
|
||||
void PCB_EDIT_FRAME::ToggleLayersManager()
|
||||
{
|
||||
PCBNEW_SETTINGS* settings = GetPcbNewSettings();
|
||||
wxAuiPaneInfo& layersManager = m_auimgr.GetPane( "LayersManager" );
|
||||
wxAuiPaneInfo& layersManager = m_auimgr.GetPane( AppearancePanelName() );
|
||||
wxAuiPaneInfo& selectionFilter = m_auimgr.GetPane( "SelectionFilter" );
|
||||
|
||||
// show auxiliary Vertical layers and visibility manager toolbar
|
||||
m_show_layer_manager_tools = layersManager.IsShown();
|
||||
|
||||
m_show_layer_manager_tools = !m_show_layer_manager_tools;
|
||||
|
||||
layersManager.Show( m_show_layer_manager_tools );
|
||||
@ -722,6 +724,8 @@ void PCB_EDIT_FRAME::ToggleNetInspector()
|
||||
PCBNEW_SETTINGS* settings = GetPcbNewSettings();
|
||||
wxAuiPaneInfo& netInspectorPanel = m_auimgr.GetPane( NetInspectorPanelName() );
|
||||
|
||||
m_show_net_inspector = netInspectorPanel.IsShown();
|
||||
|
||||
m_show_net_inspector = !m_show_net_inspector;
|
||||
|
||||
netInspectorPanel.Show( m_show_net_inspector );
|
||||
@ -752,7 +756,7 @@ void PCB_EDIT_FRAME::ToggleSearch()
|
||||
|
||||
wxAuiPaneInfo& searchPaneInfo = m_auimgr.GetPane( SearchPaneName() );
|
||||
searchPaneInfo.Show( m_show_search );
|
||||
|
||||
|
||||
if( m_show_search )
|
||||
{
|
||||
searchPaneInfo.Direction( settings->m_AuiPanels.search_panel_dock_direction );
|
||||
@ -772,7 +776,7 @@ void PCB_EDIT_FRAME::ToggleSearch()
|
||||
m_searchPane->FocusSearch();
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
settings->m_AuiPanels.search_panel_height = m_searchPane->GetSize().y;
|
||||
settings->m_AuiPanels.search_panel_width = m_searchPane->GetSize().x;
|
||||
settings->m_AuiPanels.search_panel_dock_direction = searchPaneInfo.dock_direction;
|
||||
|
Loading…
Reference in New Issue
Block a user