Bail on our custom dockart provider.
It appears that it was causing some crashes, and it was never clear that it looked better anyway.
This commit is contained in:
parent
10c25a2290
commit
2553dd2942
|
@ -282,7 +282,6 @@ set( COMMON_SRCS
|
|||
eda_base_frame.cpp
|
||||
eda_dde.cpp
|
||||
eda_doc.cpp
|
||||
eda_dockart.cpp
|
||||
eda_draw_frame.cpp
|
||||
eda_pattern_match.cpp
|
||||
eda_size_ctrl.cpp
|
||||
|
|
|
@ -1,95 +0,0 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you may find one here:
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <eda_dockart.h>
|
||||
#include <wx/aui/tabart.h>
|
||||
#include <wx/aui/auibook.h>
|
||||
#include <eda_draw_frame.h>
|
||||
|
||||
void EDA_DOCKART::DrawBorder( wxDC& aDC, wxWindow* aWindow, const wxRect& aRect,
|
||||
wxAuiPaneInfo& aPane )
|
||||
{
|
||||
const wxRect& r = aRect;
|
||||
aDC.SetPen( m_borderPen );
|
||||
aDC.SetBrush( *wxTRANSPARENT_BRUSH );
|
||||
|
||||
// notebooks draw the border themselves, so they can use native rendering (e.g. tabartgtk)
|
||||
wxAuiTabArt* art = nullptr;
|
||||
wxAuiNotebook* nb = wxDynamicCast( aWindow, wxAuiNotebook );
|
||||
|
||||
if( nb )
|
||||
art = nb->GetArtProvider();
|
||||
|
||||
if( art )
|
||||
{
|
||||
art->DrawBorder( aDC, aWindow, r );
|
||||
}
|
||||
else if( aPane.name == "DrawFrame" )
|
||||
{
|
||||
// We don't want to re-write the layout manager, so we give the canvas a single-pixel
|
||||
// border and then fill in the top and left with the canvas background colour.
|
||||
//
|
||||
// This achieves a right-bottom-bordered canvas, which works reasonably well with
|
||||
// wxWidgets right-bottom bordered toolbars.
|
||||
|
||||
//wxWindow* window = reinterpret_cast<wxWindow*>( m_frame->GetCanvas() );
|
||||
//wxSize scrollbarSize = window->GetSize() - window->GetClientSize();
|
||||
// Not sure why it takes a pen twice as wide as the border to fill it in, but it does.
|
||||
#if 0
|
||||
int borderWidth = GetMetric( wxAUI_DOCKART_PANE_BORDER_SIZE ) * 2;
|
||||
int borderAdjust = borderWidth;
|
||||
|
||||
aDC.SetPen( wxPen( m_frame->GetDrawBgColor().ToColour(), borderWidth ) );
|
||||
|
||||
// Yes, this leaves me scratching my head too.
|
||||
if( m_frame->IsType( FRAME_PCB )
|
||||
|| m_frame->IsType( FRAME_PCB_MODULE_EDITOR )
|
||||
|| m_frame->IsType( FRAME_PCB_MODULE_VIEWER )
|
||||
|| m_frame->IsType( FRAME_PCB_MODULE_VIEWER_MODAL )
|
||||
|| m_frame->IsType( FRAME_GERBER ) )
|
||||
{
|
||||
borderAdjust += 1;
|
||||
}
|
||||
|
||||
// left
|
||||
aDC.DrawLine( r.x + 1, r.y, r.x + 1, r.y + r.height - borderAdjust - scrollbarSize.y );
|
||||
// top
|
||||
aDC.DrawLine( r.x + 1, r.y, r.x + r.width - borderAdjust - scrollbarSize.x, r.y );
|
||||
|
||||
aDC.SetPen( m_borderPen );
|
||||
|
||||
// finish off bottom of left side (at end of scrollbar)
|
||||
aDC.DrawLine( r.x, r.y + r.height - 1 - scrollbarSize.y, r.x, r.y + r.height - 1 );
|
||||
// right
|
||||
aDC.DrawLine( r.x + r.width, r.y, r.x + r.width, r.y + r.height - 1 );
|
||||
// bottom
|
||||
aDC.DrawLine( r.x, r.y + r.height - 1, r.x + r.width - 1, r.y + r.height - 1 );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
aDC.DrawRectangle( r );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -28,7 +28,6 @@
|
|||
#include <class_module.h>
|
||||
#include <common.h>
|
||||
#include <confirm.h>
|
||||
#include <eda_dockart.h>
|
||||
#include <fp_lib_table.h>
|
||||
#include <id.h>
|
||||
#include <lib_id.h>
|
||||
|
@ -41,7 +40,6 @@
|
|||
#include <tool/tool_dispatcher.h>
|
||||
#include <tool/tool_manager.h>
|
||||
#include <tool/zoom_tool.h>
|
||||
|
||||
#include <cvpcb_mainframe.h>
|
||||
#include <display_footprints_frame.h>
|
||||
#include <tools/cvpcb_actions.h>
|
||||
|
@ -128,7 +126,6 @@ DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( KIWAY* aKiway, wxWindow* aPa
|
|||
ReCreateOptToolbar();
|
||||
|
||||
m_auimgr.SetManagedWindow( this );
|
||||
m_auimgr.SetArtProvider( new EDA_DOCKART() );
|
||||
|
||||
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) );
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include <sch_draw_panel.h>
|
||||
#include <base_screen.h>
|
||||
#include <confirm.h>
|
||||
#include <eda_dockart.h>
|
||||
#include <general.h>
|
||||
#include <eeschema_id.h>
|
||||
#include <lib_edit_frame.h>
|
||||
|
@ -155,7 +154,6 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
RebuildSymbolUnitsList();
|
||||
|
||||
m_auimgr.SetManagedWindow( this );
|
||||
m_auimgr.SetArtProvider( new EDA_DOCKART() );
|
||||
|
||||
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) );
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include <base_units.h>
|
||||
#include <confirm.h>
|
||||
#include <eda_dockart.h>
|
||||
#include <executable_names.h>
|
||||
#include <fctsys.h>
|
||||
#include <gestfich.h>
|
||||
|
@ -279,7 +278,6 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ):
|
|||
m_pageSetupData.GetPrintData().SetNoCopies( 1 );
|
||||
|
||||
m_auimgr.SetManagedWindow( this );
|
||||
m_auimgr.SetArtProvider( new EDA_DOCKART() );
|
||||
|
||||
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) );
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include <sch_view.h>
|
||||
#include <msgpanel.h>
|
||||
#include <bitmaps.h>
|
||||
#include <eda_dockart.h>
|
||||
#include <eeschema_id.h>
|
||||
#include <viewlib_frame.h>
|
||||
#include <symbol_lib_table.h>
|
||||
|
@ -163,7 +162,6 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
|
|||
DisplayLibInfos();
|
||||
|
||||
m_auimgr.SetManagedWindow( this );
|
||||
m_auimgr.SetArtProvider( new EDA_DOCKART() );
|
||||
|
||||
// Manage main toolbar
|
||||
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" ).Top().Layer(6) );
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include <msgpanel.h>
|
||||
#include <bitmaps.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
#include <eda_dockart.h>
|
||||
#include <gerbview.h>
|
||||
#include <gerbview_frame.h>
|
||||
#include <gerbview_id.h>
|
||||
|
@ -143,7 +142,6 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ):
|
|||
ReCreateAuxiliaryToolbar();
|
||||
|
||||
m_auimgr.SetManagedWindow( this );
|
||||
m_auimgr.SetArtProvider( new EDA_DOCKART() );
|
||||
|
||||
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(4) );
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you may find one here:
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifndef EDA_DOCKART_H
|
||||
#define EDA_DOCKART_H
|
||||
|
||||
#include <wx/aui/aui.h>
|
||||
#include <wx/aui/dockart.h>
|
||||
#include <wx/aui/framemanager.h>
|
||||
|
||||
class EDA_DOCKART : public wxAuiDefaultDockArt
|
||||
{
|
||||
public:
|
||||
EDA_DOCKART()
|
||||
{
|
||||
SetMetric( wxAUI_DOCKART_PANE_BORDER_SIZE, 1 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw borders for Kicad AUI panes.
|
||||
*
|
||||
* The principal specialization over wxWidgets' default borders is the absence of a
|
||||
* white single-pixel frame (which looks particularly poor on canvasses with dark
|
||||
* backgrounds).
|
||||
*/
|
||||
void DrawBorder( wxDC& aDC, wxWindow* aWindow, const wxRect& r,
|
||||
wxAuiPaneInfo& aPane ) override;
|
||||
};
|
||||
|
||||
|
||||
#endif //EDA_DOCKART_H
|
|
@ -29,7 +29,6 @@
|
|||
#include <base_units.h>
|
||||
#include <msgpanel.h>
|
||||
#include <bitmaps.h>
|
||||
#include <eda_dockart.h>
|
||||
#include <pl_editor_frame.h>
|
||||
#include <pl_editor_id.h>
|
||||
#include <pl_draw_panel_gal.h>
|
||||
|
@ -155,7 +154,6 @@ PL_EDITOR_FRAME::PL_EDITOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
SetStatusWidths( arrayDim( dims ), dims );
|
||||
|
||||
m_auimgr.SetManagedWindow( this );
|
||||
m_auimgr.SetArtProvider( new EDA_DOCKART() );
|
||||
|
||||
m_propertiesPagelayout = new PROPERTIES_FRAME( this );
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include <3d_viewer/eda_3d_viewer.h>
|
||||
#include <fp_lib_table.h>
|
||||
#include <bitmaps.h>
|
||||
#include <eda_dockart.h>
|
||||
#include <class_board.h>
|
||||
#include <class_module.h>
|
||||
#include <pcbnew.h>
|
||||
|
@ -187,7 +186,6 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent,
|
|||
m_Layers->OnLayerSelected();
|
||||
|
||||
m_auimgr.SetManagedWindow( this );
|
||||
m_auimgr.SetArtProvider( new EDA_DOCKART() );
|
||||
|
||||
// Horizontal items; layers 4 - 6
|
||||
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" ).Top().Layer(6) );
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include <lib_id.h>
|
||||
#include <confirm.h>
|
||||
#include <bitmaps.h>
|
||||
#include <eda_dockart.h>
|
||||
#include <pcb_painter.h>
|
||||
#include <class_board.h>
|
||||
#include <class_module.h>
|
||||
|
@ -228,7 +227,6 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent
|
|||
drawPanel->DisplayBoard( m_Pcb );
|
||||
|
||||
m_auimgr.SetManagedWindow( this );
|
||||
m_auimgr.SetArtProvider( new EDA_DOCKART() );
|
||||
|
||||
// Horizontal items; layers 4 - 6
|
||||
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().VToolbar().Name( "MainToolbar" ).Top().Layer(6) );
|
||||
|
|
|
@ -33,13 +33,10 @@
|
|||
#include <macros.h>
|
||||
#include <bitmaps.h>
|
||||
#include <grid_tricks.h>
|
||||
#include <eda_dockart.h>
|
||||
#include <class_board.h>
|
||||
#include <class_module.h>
|
||||
#include <footprint_edit_frame.h>
|
||||
#include <pcbnew_id.h>
|
||||
#include "footprint_wizard_frame.h"
|
||||
#include <footprint_info.h>
|
||||
#include <wx/tokenzr.h>
|
||||
#include <wx/numformatter.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
|
@ -192,7 +189,6 @@ FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME( KIWAY* aKiway, wxWindow* aParent
|
|||
DisplayWizardInfos();
|
||||
|
||||
m_auimgr.SetManagedWindow( this );
|
||||
m_auimgr.SetArtProvider( new EDA_DOCKART() );
|
||||
|
||||
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)
|
||||
|
|
|
@ -81,7 +81,6 @@
|
|||
#include <autorouter/autoplacer_tool.h>
|
||||
#include <gestfich.h>
|
||||
#include <executable_names.h>
|
||||
#include <eda_dockart.h>
|
||||
#include <board_netlist_updater.h>
|
||||
#include <netlist_reader.h>
|
||||
#include <pcb_netlist.h>
|
||||
|
@ -235,7 +234,6 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
ReCreateMicrowaveVToolbar();
|
||||
|
||||
m_auimgr.SetManagedWindow( this );
|
||||
m_auimgr.SetArtProvider( new EDA_DOCKART() );
|
||||
|
||||
// Horizontal items; layers 4 - 6
|
||||
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" ).Top().Layer(6) );
|
||||
|
|
Loading…
Reference in New Issue