Fix some issues with Infobar sizing.
This also commits to the new strategy as it wasn't really compatible with if-def-ing anymore.
This commit is contained in:
parent
525934881f
commit
73b7b104cd
|
@ -89,11 +89,9 @@ PANEL_PREV_3D::PANEL_PREV_3D( wxWindow* aParent, PCB_BASE_FRAME* aFrame, FOOTPRI
|
|||
m_dummyFootprint = new FOOTPRINT( *aFootprint );
|
||||
m_dummyBoard->Add( m_dummyFootprint );
|
||||
|
||||
// Create the infobar
|
||||
m_infobar = new WX_INFOBAR( this );
|
||||
|
||||
// Create the 3D canvas
|
||||
m_previewPane = new EDA_3D_CANVAS( this, COGL_ATT_LIST::GetAttributesList( ANTIALIASING_MODE::AA_8X ),
|
||||
m_previewPane = new EDA_3D_CANVAS( this,
|
||||
COGL_ATT_LIST::GetAttributesList( ANTIALIASING_MODE::AA_8X ),
|
||||
m_dummyBoard, m_boardAdapter, m_currentCamera,
|
||||
aFrame->Prj().Get3DCacheManager() );
|
||||
|
||||
|
@ -119,9 +117,8 @@ PANEL_PREV_3D::PANEL_PREV_3D( wxWindow* aParent, PCB_BASE_FRAME* aFrame, FOOTPRI
|
|||
m_SizerPanelView->Add( m_infobar, 0, wxEXPAND, 0 );
|
||||
m_SizerPanelView->Add( m_previewPane, 1, wxEXPAND, 5 );
|
||||
|
||||
// Tell the canvas about the infobar
|
||||
if( m_infobar )
|
||||
m_previewPane->SetInfoBar( m_infobar );
|
||||
m_infobar = new WX_INFOBAR( this );
|
||||
m_previewPane->SetInfoBar( m_infobar );
|
||||
|
||||
for( wxEventType eventType : { wxEVT_MENU_OPEN, wxEVT_MENU_CLOSE, wxEVT_MENU_HIGHLIGHT } )
|
||||
Connect( eventType, wxMenuEventHandler( PANEL_PREV_3D::OnMenuEvent ), NULL, this );
|
||||
|
|
|
@ -141,31 +141,19 @@ EDA_3D_VIEWER::EDA_3D_VIEWER( KIWAY *aKiway, PCB_BASE_FRAME *aParent, const wxSt
|
|||
CreateMenuBar();
|
||||
ReCreateMainToolbar();
|
||||
|
||||
// Create the infobar
|
||||
m_infoBar = new WX_INFOBAR( this, &m_auimgr );
|
||||
|
||||
m_auimgr.SetManagedWindow( this );
|
||||
|
||||
m_auimgr.AddPane( m_mainToolBar,
|
||||
EDA_PANE().HToolbar().Name( "MainToolbar" ).Top().Layer( 6 ) );
|
||||
m_auimgr.AddPane( m_infoBar,
|
||||
EDA_PANE().InfoBar().Name( "InfoBar" ).Top().Layer(1) );
|
||||
m_auimgr.AddPane( m_canvas,
|
||||
EDA_PANE().Canvas().Name( "DrawFrame" ).Center() );
|
||||
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" )
|
||||
.Top().Layer( 6 ) );
|
||||
m_auimgr.AddPane( m_canvas, EDA_PANE().Canvas().Name( "DrawFrame" )
|
||||
.Center() );
|
||||
|
||||
// Call Update() to fix all pane default sizes, especially the "InfoBar" pane before
|
||||
// hidding it.
|
||||
// Call Update() to fix all pane default sizes.
|
||||
m_auimgr.Update();
|
||||
|
||||
// We don't want the infobar displayed right away
|
||||
m_auimgr.GetPane( "InfoBar" ).Hide();
|
||||
m_auimgr.Update();
|
||||
|
||||
if( m_canvas )
|
||||
{
|
||||
m_canvas->SetInfoBar( m_infoBar );
|
||||
m_canvas->SetStatusBar( status_bar );
|
||||
}
|
||||
m_infoBar = new WX_INFOBAR( m_canvas );
|
||||
m_canvas->SetInfoBar( m_infoBar );
|
||||
m_canvas->SetStatusBar( status_bar );
|
||||
|
||||
// Fixes bug in Windows (XP and possibly others) where the canvas requires the focus
|
||||
// in order to receive mouse events. Otherwise, the user has to click somewhere on
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include <id.h>
|
||||
#include <widgets/infobar.h>
|
||||
#include "wx/artprov.h"
|
||||
#include <wx/aui/framemanager.h>
|
||||
#include <wx/debug.h>
|
||||
#include <wx/infobar.h>
|
||||
#include <wx/sizer.h>
|
||||
|
@ -41,23 +40,16 @@ BEGIN_EVENT_TABLE( WX_INFOBAR, wxInfoBarGeneric )
|
|||
END_EVENT_TABLE()
|
||||
|
||||
|
||||
WX_INFOBAR::WX_INFOBAR( wxWindow* aParent, wxAuiManager* aMgr, wxWindowID aWinid )
|
||||
WX_INFOBAR::WX_INFOBAR( wxWindow* aParent, wxWindowID aWinid )
|
||||
: wxInfoBarGeneric( aParent, aWinid ),
|
||||
m_showTime( 0 ),
|
||||
m_updateLock( false ),
|
||||
m_showTimer( nullptr ),
|
||||
m_auiManager( aMgr )
|
||||
m_showTimer( nullptr )
|
||||
{
|
||||
m_showTimer = new wxTimer( this, ID_CLOSE_INFOBAR );
|
||||
|
||||
#if 1
|
||||
m_auiManager = nullptr;
|
||||
SetShowHideEffects( wxSHOW_EFFECT_ROLL_TO_BOTTOM, wxSHOW_EFFECT_ROLL_TO_TOP );
|
||||
SetEffectDuration( 300 );
|
||||
#else
|
||||
// Don't use any effects since they leave the sizer area visible under the infobar
|
||||
SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE );
|
||||
#endif
|
||||
|
||||
// The infobar seems to start too small, so increase its height
|
||||
int sx, sy;
|
||||
|
@ -78,6 +70,8 @@ WX_INFOBAR::WX_INFOBAR( wxWindow* aParent, wxAuiManager* aMgr, wxWindowID aWinid
|
|||
RemoveAllButtons();
|
||||
|
||||
Layout();
|
||||
|
||||
m_parent->Bind( wxEVT_SIZE, &WX_INFOBAR::onSize, this );
|
||||
}
|
||||
|
||||
|
||||
|
@ -133,9 +127,6 @@ void WX_INFOBAR::ShowMessage( const wxString& aMessage, int aFlags )
|
|||
|
||||
wxInfoBarGeneric::ShowMessage( aMessage, aFlags );
|
||||
|
||||
if( m_auiManager )
|
||||
UpdateAuiLayout( true );
|
||||
|
||||
if( m_showTime > 0 )
|
||||
m_showTimer->StartOnce( m_showTime );
|
||||
|
||||
|
@ -153,30 +144,19 @@ void WX_INFOBAR::Dismiss()
|
|||
|
||||
wxInfoBarGeneric::Dismiss();
|
||||
|
||||
if( m_auiManager )
|
||||
UpdateAuiLayout( false );
|
||||
|
||||
m_updateLock = false;
|
||||
}
|
||||
|
||||
|
||||
void WX_INFOBAR::UpdateAuiLayout( bool aShow )
|
||||
void WX_INFOBAR::onSize( wxSizeEvent& aEvent )
|
||||
{
|
||||
wxASSERT( m_auiManager );
|
||||
int barWidth = GetSize().GetWidth();
|
||||
int parentWidth = m_parent->GetSize().GetWidth();
|
||||
|
||||
wxAuiPaneInfo& pane = m_auiManager->GetPane( this );
|
||||
if( barWidth != parentWidth )
|
||||
SetSize( parentWidth, GetSize().GetHeight() );
|
||||
|
||||
// If the infobar is in a pane, then show/hide the pane
|
||||
if( pane.IsOk() )
|
||||
{
|
||||
if( aShow )
|
||||
pane.Show();
|
||||
else
|
||||
pane.Hide();
|
||||
}
|
||||
|
||||
// Update the AUI manager regardless
|
||||
m_auiManager->Update();
|
||||
aEvent.Skip();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -127,24 +127,21 @@ DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( KIWAY* aKiway, wxWindow* aPa
|
|||
ReCreateVToolbar();
|
||||
ReCreateOptToolbar();
|
||||
|
||||
// Create the infobar
|
||||
m_infoBar = new WX_INFOBAR( this, &m_auimgr );
|
||||
|
||||
m_auimgr.SetManagedWindow( this );
|
||||
|
||||
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" ).Top().Layer(6) );
|
||||
m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( "OptToolbar" ).Left().Layer(3) );
|
||||
m_auimgr.AddPane( m_infoBar, EDA_PANE().InfoBar().Name( "InfoBar" ).Top().Layer(1) );
|
||||
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( "DrawFrame" ).Center() );
|
||||
m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" ).Bottom().Layer(6) );
|
||||
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" )
|
||||
.Top().Layer( 6 ) );
|
||||
m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( "OptToolbar" )
|
||||
.Left().Layer( 3 ) );
|
||||
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( "DrawFrame" )
|
||||
.Center() );
|
||||
m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" )
|
||||
.Bottom().Layer( 6 ) );
|
||||
|
||||
// Call Update() to fix all pane default sizes, especially the "InfoBar" pane before
|
||||
// hidding it.
|
||||
// Call Update() to fix all pane default sizes.
|
||||
m_auimgr.Update();
|
||||
|
||||
// We don't want the infobar displayed right away
|
||||
m_auimgr.GetPane( "InfoBar" ).Hide();
|
||||
m_auimgr.Update();
|
||||
m_infoBar = new WX_INFOBAR( GetCanvas() );
|
||||
|
||||
auto& galOpts = GetGalDisplayOptions();
|
||||
galOpts.m_axesEnabled = true;
|
||||
|
|
|
@ -241,9 +241,6 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
ReCreateVToolbar();
|
||||
ReCreateOptToolbar();
|
||||
|
||||
// Create the infobar
|
||||
m_infoBar = new WX_INFOBAR( this, &m_auimgr );
|
||||
|
||||
// Initialize common print setup dialog settings.
|
||||
m_pageSetupData.GetPrintData().SetPrintMode( wxPRINT_MODE_PRINTER );
|
||||
m_pageSetupData.GetPrintData().SetQuality( wxPRINT_QUALITY_MEDIUM );
|
||||
|
@ -252,26 +249,21 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
|
||||
m_auimgr.SetManagedWindow( this );
|
||||
|
||||
m_auimgr.AddPane( m_mainToolBar,
|
||||
EDA_PANE().HToolbar().Name( "MainToolbar" ).Top().Layer(6) );
|
||||
m_auimgr.AddPane( m_optionsToolBar,
|
||||
EDA_PANE().VToolbar().Name( "OptToolbar" ).Left().Layer(3) );
|
||||
m_auimgr.AddPane( m_drawToolBar,
|
||||
EDA_PANE().VToolbar().Name( "ToolsToolbar" ).Right().Layer(2) );
|
||||
m_auimgr.AddPane( m_infoBar,
|
||||
EDA_PANE().InfoBar().Name( "InfoBar" ).Top().Layer(1) );
|
||||
m_auimgr.AddPane( GetCanvas(),
|
||||
EDA_PANE().Canvas().Name( "DrawFrame" ).Center() );
|
||||
m_auimgr.AddPane( m_messagePanel,
|
||||
EDA_PANE().Messages().Name( "MsgPanel" ).Bottom().Layer(6) );
|
||||
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" )
|
||||
.Top().Layer( 6 ) );
|
||||
m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( "OptToolbar" )
|
||||
.Left().Layer( 3 ) );
|
||||
m_auimgr.AddPane( m_drawToolBar, EDA_PANE().VToolbar().Name( "ToolsToolbar" )
|
||||
.Right().Layer( 2 ) );
|
||||
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( "DrawFrame" )
|
||||
.Center() );
|
||||
m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" )
|
||||
.Bottom().Layer( 6 ) );
|
||||
|
||||
// Call Update() to fix all pane default sizes, especially the "InfoBar" pane before
|
||||
// hidding it.
|
||||
// Call Update() to fix all pane default sizes.
|
||||
m_auimgr.Update();
|
||||
|
||||
// We don't want the infobar displayed right away
|
||||
m_auimgr.GetPane( "InfoBar" ).Hide();
|
||||
m_auimgr.Update();
|
||||
m_infoBar = new WX_INFOBAR( GetCanvas() );
|
||||
|
||||
resolveCanvasType();
|
||||
SwitchCanvas( m_canvasType );
|
||||
|
|
|
@ -145,32 +145,29 @@ SYMBOL_EDIT_FRAME::SYMBOL_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
DisplaySymbolDatasheet();
|
||||
RebuildSymbolUnitsList();
|
||||
|
||||
// Create the infobar
|
||||
m_infoBar = new WX_INFOBAR( this, &m_auimgr );
|
||||
|
||||
m_auimgr.SetManagedWindow( this );
|
||||
|
||||
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" ).Top().Layer(6) );
|
||||
m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" ).Bottom().Layer(6) );
|
||||
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" )
|
||||
.Top().Layer( 6 ) );
|
||||
m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" )
|
||||
.Bottom().Layer( 6 ) );
|
||||
|
||||
m_auimgr.AddPane( m_optionsToolBar,
|
||||
EDA_PANE().VToolbar().Name( "OptToolbar" ).Left().Layer(3) );
|
||||
m_auimgr.AddPane( m_treePane, EDA_PANE().Palette().Name( "ComponentTree" ).Left().Layer(2)
|
||||
.Caption( _( "Libraries" ) ).MinSize( 250, -1 ).BestSize( 250, -1 ) );
|
||||
m_auimgr.AddPane( m_drawToolBar,
|
||||
EDA_PANE().VToolbar().Name( "ToolsToolbar" ).Right().Layer(2) );
|
||||
m_auimgr.AddPane( m_infoBar,
|
||||
EDA_PANE().InfoBar().Name( "InfoBar" ).Top().Layer(1) );
|
||||
m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( "OptToolbar" )
|
||||
.Left().Layer( 3 ) );
|
||||
m_auimgr.AddPane( m_treePane, EDA_PANE().Palette().Name( "ComponentTree" )
|
||||
.Left().Layer( 2 )
|
||||
.Caption( _( "Libraries" ) )
|
||||
.MinSize( 250, -1 ).BestSize( 250, -1 ) );
|
||||
m_auimgr.AddPane( m_drawToolBar, EDA_PANE().VToolbar().Name( "ToolsToolbar" )
|
||||
.Right().Layer( 2 ) );
|
||||
|
||||
m_auimgr.AddPane( GetCanvas(), wxAuiPaneInfo().Name( "DrawFrame" ).CentrePane() );
|
||||
m_auimgr.AddPane( GetCanvas(), wxAuiPaneInfo().Name( "DrawFrame" )
|
||||
.CentrePane() );
|
||||
|
||||
// Call Update() to fix all pane default sizes, especially the "InfoBar" pane before
|
||||
// hidding it.
|
||||
// Call Update() to fix all pane default sizes.
|
||||
m_auimgr.Update();
|
||||
|
||||
// We don't want the infobar displayed right away
|
||||
m_auimgr.GetPane( "InfoBar" ).Hide();
|
||||
m_auimgr.Update();
|
||||
m_infoBar = new WX_INFOBAR( GetCanvas() );
|
||||
|
||||
if( m_settings->m_LibWidth > 0 )
|
||||
{
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include <wx/wx.h>
|
||||
|
||||
|
||||
class wxAuiManager;
|
||||
class wxHyperlinkCtrl;
|
||||
|
||||
|
||||
|
@ -77,7 +76,7 @@ public:
|
|||
* @param aMgr is the AUI manager that this infobar is added to
|
||||
* @param aWinId is the ID for this infobar object
|
||||
*/
|
||||
WX_INFOBAR( wxWindow* aParent, wxAuiManager* aMgr = nullptr, wxWindowID aWinid = wxID_ANY );
|
||||
WX_INFOBAR( wxWindow* aParent, wxWindowID aWinid = wxID_ANY );
|
||||
|
||||
~WX_INFOBAR();
|
||||
|
||||
|
@ -199,17 +198,12 @@ protected:
|
|||
*/
|
||||
void OnTimer( wxTimerEvent& aEvent );
|
||||
|
||||
/**
|
||||
* Update the AUI pane to show or hide this infobar.
|
||||
*
|
||||
* @param aShow is true to show the pane
|
||||
*/
|
||||
void UpdateAuiLayout( bool aShow );
|
||||
void onSize( wxSizeEvent& aEvent );
|
||||
|
||||
protected:
|
||||
int m_showTime; ///< The time to show the infobar. 0 = don't auto hide
|
||||
bool m_updateLock; ///< True if this infobar requested the UI update
|
||||
wxTimer* m_showTimer; ///< The timer counting the autoclose period
|
||||
wxAuiManager* m_auiManager; ///< The AUI manager that contains this infobar
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
|
|
@ -118,9 +118,6 @@ PL_EDITOR_FRAME::PL_EDITOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
ReCreateVToolbar();
|
||||
ReCreateOptToolbar();
|
||||
|
||||
// Create the infobar
|
||||
m_infoBar = new WX_INFOBAR( this, &m_auimgr );
|
||||
|
||||
wxWindow* stsbar = GetStatusBar();
|
||||
int dims[] = {
|
||||
|
||||
|
@ -155,34 +152,33 @@ PL_EDITOR_FRAME::PL_EDITOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
|
||||
m_propertiesPagelayout = new PROPERTIES_FRAME( this );
|
||||
|
||||
// Horizontal items; layers 4 - 6
|
||||
m_auimgr.AddPane( m_mainToolBar,
|
||||
EDA_PANE().HToolbar().Name( "MainToolbar" ).Top().Layer(6) );
|
||||
m_auimgr.AddPane( m_optionsToolBar,
|
||||
EDA_PANE().VToolbar().Name( "OptToolbar" ).Left().Layer(3) );
|
||||
m_auimgr.AddPane( m_messagePanel,
|
||||
EDA_PANE().Messages().Name( "MsgPanel" ).Bottom().Layer(6) );
|
||||
m_auimgr.AddPane( m_infoBar,
|
||||
EDA_PANE().InfoBar().Name( "InfoBar" ).Top().Layer(1) );
|
||||
// Rows; layers 4 - 6
|
||||
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" )
|
||||
.Top().Layer( 6 ) );
|
||||
m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( "OptToolbar" )
|
||||
.Left().Layer( 3 ) );
|
||||
m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" )
|
||||
.Bottom().Layer( 6 ) );
|
||||
|
||||
// Vertical items; layers 1 - 3
|
||||
m_auimgr.AddPane( m_drawToolBar,
|
||||
EDA_PANE().VToolbar().Name( "ToolsToolbar" ).Right().Layer(2) );
|
||||
// Columns; layers 1 - 3
|
||||
m_auimgr.AddPane( m_drawToolBar, EDA_PANE().VToolbar().Name( "ToolsToolbar" )
|
||||
.Right().Layer( 2 ) );
|
||||
|
||||
m_auimgr.AddPane( m_propertiesPagelayout, EDA_PANE().Palette().Name( "Props" ).Right().Layer(3)
|
||||
.Caption( _( "Properties" ) ).MinSize( m_propertiesPagelayout->GetMinSize() )
|
||||
m_auimgr.AddPane( m_propertiesPagelayout, EDA_PANE().Palette().Name( "Props" )
|
||||
.Right().Layer( 3 )
|
||||
.Caption( _( "Properties" ) )
|
||||
.MinSize( m_propertiesPagelayout->GetMinSize() )
|
||||
.BestSize( m_propertiesFrameWidth, -1 ) );
|
||||
|
||||
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( "DrawFrame" ).Center() );
|
||||
// Center
|
||||
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( "DrawFrame" )
|
||||
.Center() );
|
||||
|
||||
|
||||
// Call Update() to fix all pane default sizes, especially the "InfoBar" pane before
|
||||
// hidding it.
|
||||
// Call Update() to fix all pane default sizes.
|
||||
m_auimgr.Update();
|
||||
|
||||
// We don't want the infobar displayed right away
|
||||
m_auimgr.GetPane( "InfoBar" ).Hide();
|
||||
m_auimgr.Update();
|
||||
m_infoBar = new WX_INFOBAR( GetCanvas() );
|
||||
|
||||
resolveCanvasType();
|
||||
SwitchCanvas( m_canvasType );
|
||||
|
|
|
@ -197,44 +197,49 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent,
|
|||
|
||||
SetActiveLayer( F_SilkS );
|
||||
|
||||
// Create the infobar
|
||||
m_infoBar = new WX_INFOBAR( this, &m_auimgr );
|
||||
|
||||
m_auimgr.SetManagedWindow( this );
|
||||
|
||||
unsigned int auiFlags = wxAUI_MGR_DEFAULT;
|
||||
#if !defined( _WIN32 )
|
||||
// Windows cannot redraw the UI fast enough during a live resize and may lead to all kinds of graphical glitches
|
||||
// Windows cannot redraw the UI fast enough during a live resize and may lead to all kinds
|
||||
// of graphical glitches
|
||||
auiFlags |= wxAUI_MGR_LIVE_RESIZE;
|
||||
#endif
|
||||
m_auimgr.SetFlags( auiFlags );
|
||||
|
||||
// Horizontal items; layers 4 - 6
|
||||
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" ).Top().Layer( 6 ) );
|
||||
m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" ).Bottom().Layer( 6 ) );
|
||||
m_auimgr.AddPane( m_infoBar,
|
||||
EDA_PANE().InfoBar().Name( "InfoBar" ).Top().Layer(1) );
|
||||
// Rows; layers 4 - 6
|
||||
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" )
|
||||
.Top().Layer( 6 ) );
|
||||
m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" )
|
||||
.Bottom().Layer( 6 ) );
|
||||
|
||||
// Vertical items; layers 1 - 3
|
||||
m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( "OptToolbar" ).Left().Layer( 3 ) );
|
||||
m_auimgr.AddPane( m_treePane, EDA_PANE().Palette().Name( "Footprints" ).Left().Layer(2)
|
||||
.Caption( _( "Libraries" ) ).MinSize( 250, 400 ).Resizable() );
|
||||
// Columns; layers 1 - 3
|
||||
m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( "OptToolbar" )
|
||||
.Left().Layer( 3 ) );
|
||||
m_auimgr.AddPane( m_treePane, EDA_PANE().Palette().Name( "Footprints" )
|
||||
.Left().Layer(2)
|
||||
.Caption( _( "Libraries" ) )
|
||||
.MinSize( 250, 400 ).Resizable() );
|
||||
|
||||
m_auimgr.AddPane( m_drawToolBar, EDA_PANE().VToolbar().Name( "ToolsToolbar" ).Right().Layer(2) );
|
||||
m_auimgr.AddPane( m_drawToolBar, EDA_PANE().VToolbar().Name( "ToolsToolbar" )
|
||||
.Right().Layer(2) );
|
||||
|
||||
m_auimgr.AddPane( m_appearancePanel, EDA_PANE().Name( "LayersManager" ).Right().Layer( 3 )
|
||||
m_auimgr.AddPane( m_appearancePanel, EDA_PANE().Name( "LayersManager" )
|
||||
.Right().Layer( 3 )
|
||||
.Caption( _( "Appearance" ) ).PaneBorder( false )
|
||||
.MinSize( 180, -1 ).BestSize( 180, -1 ) );
|
||||
m_auimgr.AddPane( m_selectionFilterPanel,
|
||||
EDA_PANE().Palette().Name( "SelectionFilter" ).Right().Layer( 3 )
|
||||
.Caption( _( "Selection Filter" ) ).PaneBorder( false ).Position( 2 )
|
||||
m_auimgr.AddPane( m_selectionFilterPanel, EDA_PANE().Palette().Name( "SelectionFilter" )
|
||||
.Right().Layer( 3 ).Position( 2 )
|
||||
.Caption( _( "Selection Filter" ) ).PaneBorder( false )
|
||||
.MinSize( 160, -1 ).BestSize( m_selectionFilterPanel->GetBestSize() ) );
|
||||
|
||||
// Center
|
||||
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( "DrawFrame" )
|
||||
.Center() );
|
||||
|
||||
// The selection filter doesn't need to grow in the vertical direction when docked
|
||||
m_auimgr.GetPane( "SelectionFilter" ).dock_proportion = 0;
|
||||
|
||||
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( "DrawFrame" ).Center() );
|
||||
|
||||
ActivateGalCanvas();
|
||||
|
||||
m_auimgr.GetArtProvider()->SetColour( wxAUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR,
|
||||
|
@ -242,13 +247,10 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent,
|
|||
m_auimgr.GetArtProvider()->SetColour( wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR,
|
||||
wxSystemSettings::GetColour( wxSYS_COLOUR_BTNTEXT ) );
|
||||
|
||||
// Call Update() to fix all pane default sizes, especially the "InfoBar" pane before
|
||||
// hidding it.
|
||||
// Call Update() to fix all pane default sizes.
|
||||
m_auimgr.Update();
|
||||
|
||||
// We don't want the infobar displayed right away
|
||||
m_auimgr.GetPane( "InfoBar" ).Hide();
|
||||
m_auimgr.Update();
|
||||
m_infoBar = new WX_INFOBAR( GetCanvas() );
|
||||
|
||||
if( m_settings->m_LibWidth > 0 )
|
||||
{
|
||||
|
|
|
@ -221,9 +221,6 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
|
||||
m_selectionFilterPanel = new PANEL_SELECTION_FILTER( this );
|
||||
|
||||
// Create the infobar
|
||||
m_infoBar = new WX_INFOBAR( this, &m_auimgr );
|
||||
|
||||
m_appearancePanel = new APPEARANCE_CONTROLS( this, GetCanvas() );
|
||||
|
||||
m_auimgr.SetManagedWindow( this );
|
||||
|
@ -235,34 +232,34 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
#endif
|
||||
m_auimgr.SetFlags( auiFlags );
|
||||
|
||||
// Horizontal items; layers 4 - 6
|
||||
m_auimgr.AddPane( m_mainToolBar,
|
||||
EDA_PANE().HToolbar().Name( "MainToolbar" ).Top().Layer(6) );
|
||||
m_auimgr.AddPane( m_auxiliaryToolBar,
|
||||
EDA_PANE().HToolbar().Name( "AuxToolbar" ).Top().Layer(5) );
|
||||
m_auimgr.AddPane( m_messagePanel,
|
||||
EDA_PANE().Messages().Name( "MsgPanel" ).Bottom().Layer(6) );
|
||||
m_auimgr.AddPane( m_infoBar,
|
||||
EDA_PANE().InfoBar().Name( "InfoBar" ).Top().Layer(1) );
|
||||
// Rows; layers 4 - 6
|
||||
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" )
|
||||
.Top().Layer( 6 ) );
|
||||
m_auimgr.AddPane( m_auxiliaryToolBar, EDA_PANE().HToolbar().Name( "AuxToolbar" )
|
||||
.Top().Layer( 5 ) );
|
||||
m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" )
|
||||
.Bottom().Layer( 6 ) );
|
||||
|
||||
// Vertical items; layers 1 - 3
|
||||
m_auimgr.AddPane( m_optionsToolBar,
|
||||
EDA_PANE().VToolbar().Name( "OptToolbar" ).Left().Layer(3) );
|
||||
// Columns; layers 1 - 3
|
||||
m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( "OptToolbar" )
|
||||
.Left().Layer( 3 ) );
|
||||
|
||||
m_auimgr.AddPane( m_drawToolBar,
|
||||
EDA_PANE().VToolbar().Name( "ToolsToolbar" ).Right().Layer(3) );
|
||||
m_auimgr.AddPane( m_drawToolBar, EDA_PANE().VToolbar().Name( "ToolsToolbar" )
|
||||
.Right().Layer( 3 ) );
|
||||
|
||||
m_auimgr.AddPane( m_appearancePanel,
|
||||
EDA_PANE().Name( "LayersManager" ).Right().Layer( 4 )
|
||||
m_auimgr.AddPane( m_appearancePanel, EDA_PANE().Name( "LayersManager" )
|
||||
.Right().Layer( 4 )
|
||||
.Caption( _( "Appearance" ) ).PaneBorder( false )
|
||||
.MinSize( 180, -1 ).BestSize( 180, -1 ) );
|
||||
|
||||
m_auimgr.AddPane( m_selectionFilterPanel,
|
||||
EDA_PANE().Name( "SelectionFilter" ).Right().Layer( 4 )
|
||||
.Caption( _( "Selection Filter" ) ).PaneBorder( false ).Position( 2 )
|
||||
m_auimgr.AddPane( m_selectionFilterPanel, EDA_PANE().Name( "SelectionFilter" )
|
||||
.Right().Layer( 4 ).Position( 2 )
|
||||
.Caption( _( "Selection Filter" ) ).PaneBorder( false )
|
||||
.MinSize( 180, -1 ).BestSize( 180, -1 ) );
|
||||
|
||||
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( "DrawFrame" ).Center() );
|
||||
// Center
|
||||
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( "DrawFrame" )
|
||||
.Center() );
|
||||
|
||||
m_auimgr.GetPane( "LayersManager" ).Show( m_show_layer_manager_tools );
|
||||
m_auimgr.GetPane( "SelectionFilter" ).Show( m_show_layer_manager_tools );
|
||||
|
@ -275,10 +272,11 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
m_auimgr.GetArtProvider()->SetColour( wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR,
|
||||
wxSystemSettings::GetColour( wxSYS_COLOUR_BTNTEXT ) );
|
||||
|
||||
// Call Update() to fix all pane default sizes, especially the "InfoBar" pane before
|
||||
// hidding it.
|
||||
// Call Update() to fix all pane default sizes.
|
||||
m_auimgr.Update();
|
||||
|
||||
m_infoBar = new WX_INFOBAR( GetCanvas() );
|
||||
|
||||
if( PCBNEW_SETTINGS* settings = dynamic_cast<PCBNEW_SETTINGS*>( config() ) )
|
||||
{
|
||||
if( settings->m_AuiPanels.right_panel_width > 0 )
|
||||
|
@ -300,10 +298,6 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
m_appearancePanel->SetTabIndex( settings->m_AuiPanels.appearance_panel_tab );
|
||||
}
|
||||
|
||||
// We don't want the infobar displayed right away
|
||||
m_auimgr.GetPane( "InfoBar" ).Hide();
|
||||
m_auimgr.Update();
|
||||
|
||||
GetToolManager()->RunAction( ACTIONS::zoomFitScreen, false );
|
||||
|
||||
// This is used temporarily to fix a client size issue on GTK that causes zoom to fit
|
||||
|
|
|
@ -762,7 +762,8 @@ int ROUTER_TOOL::handleLayerSwitch( const TOOL_EVENT& aEvent, bool aForceVia )
|
|||
{
|
||||
WX_INFOBAR* infobar = frame()->GetInfoBar();
|
||||
wxHyperlinkCtrl* button = new wxHyperlinkCtrl( infobar, wxID_ANY,
|
||||
_( "Show board setup" ), wxEmptyString );
|
||||
_( "Show board setup" ),
|
||||
wxEmptyString );
|
||||
|
||||
button->Bind( wxEVT_COMMAND_HYPERLINK, std::function<void( wxHyperlinkEvent& aEvent )>(
|
||||
[&]( wxHyperlinkEvent& aEvent )
|
||||
|
|
|
@ -2773,7 +2773,7 @@ void APPEARANCE_CONTROLS::onReadOnlySwatch()
|
|||
[&]( wxHyperlinkEvent& aEvent )
|
||||
{
|
||||
wxCommandEvent dummy;
|
||||
m_frame->OnPreferences( dummy );
|
||||
m_frame->OnPreferences( dummy );
|
||||
} ) );
|
||||
|
||||
infobar->RemoveAllButtons();
|
||||
|
|
Loading…
Reference in New Issue