pleditor: Remove background color toggle action
The new color theme system replaces the need to toggle the background color in the editor. Fixes https://gitlab.com/kicad/code/kicad/issues/5050
This commit is contained in:
parent
45fb030b9b
commit
75bc1ef6a7
|
@ -109,7 +109,6 @@ void PL_EDITOR_FRAME::ReCreateMenuBar()
|
||||||
viewMenu->Add( ACTIONS::zoomRedraw );
|
viewMenu->Add( ACTIONS::zoomRedraw );
|
||||||
|
|
||||||
viewMenu->AppendSeparator();
|
viewMenu->AppendSeparator();
|
||||||
viewMenu->Add( PL_ACTIONS::toggleBackground, ACTION_MENU::CHECK );
|
|
||||||
viewMenu->Add( ACTIONS::toggleGrid, ACTION_MENU::CHECK );
|
viewMenu->Add( ACTIONS::toggleGrid, ACTION_MENU::CHECK );
|
||||||
viewMenu->Add( ACTIONS::toggleCursorStyle, ACTION_MENU::CHECK );
|
viewMenu->Add( ACTIONS::toggleCursorStyle, ACTION_MENU::CHECK );
|
||||||
|
|
||||||
|
|
|
@ -276,13 +276,6 @@ void PL_EDITOR_FRAME::setupUIConditions()
|
||||||
// Not a tool, just a way to activate the action
|
// Not a tool, just a way to activate the action
|
||||||
mgr->SetConditions( PL_ACTIONS::appendImportedWorksheet, CHECK( SELECTION_CONDITIONS::ShowNever ) );
|
mgr->SetConditions( PL_ACTIONS::appendImportedWorksheet, CHECK( SELECTION_CONDITIONS::ShowNever ) );
|
||||||
|
|
||||||
auto whiteBackgroundCondition = [ this ] ( const SELECTION& aSel ) {
|
|
||||||
return GetDrawBgColor() == WHITE;
|
|
||||||
};
|
|
||||||
|
|
||||||
mgr->SetConditions( PL_ACTIONS::toggleBackground, Check( whiteBackgroundCondition ) );
|
|
||||||
|
|
||||||
|
|
||||||
auto titleBlockNormalMode =
|
auto titleBlockNormalMode =
|
||||||
[] ( const SELECTION& )
|
[] ( const SELECTION& )
|
||||||
{
|
{
|
||||||
|
|
|
@ -76,11 +76,6 @@ TOOL_ACTION PL_ACTIONS::appendImportedWorksheet( "plEditor.InteractiveEdit.appen
|
||||||
|
|
||||||
// PL_EDITOR_CONTROL
|
// PL_EDITOR_CONTROL
|
||||||
//
|
//
|
||||||
TOOL_ACTION PL_ACTIONS::toggleBackground( "plEditor.EditorControl.ToggleBackground",
|
|
||||||
AS_GLOBAL, 0, "",
|
|
||||||
_( "Background White" ), _( "Switch between white and black background" ),
|
|
||||||
palette_xpm );
|
|
||||||
|
|
||||||
TOOL_ACTION PL_ACTIONS::showInspector( "plEditor.EditorControl.ShowInspector",
|
TOOL_ACTION PL_ACTIONS::showInspector( "plEditor.EditorControl.ShowInspector",
|
||||||
AS_GLOBAL, 0, "",
|
AS_GLOBAL, 0, "",
|
||||||
_( "Show Design Inspector" ), _( "Show the list of items in page layout" ),
|
_( "Show Design Inspector" ), _( "Show the list of items in page layout" ),
|
||||||
|
|
|
@ -75,7 +75,6 @@ public:
|
||||||
|
|
||||||
// Miscellaneous
|
// Miscellaneous
|
||||||
static TOOL_ACTION refreshPreview;
|
static TOOL_ACTION refreshPreview;
|
||||||
static TOOL_ACTION toggleBackground;
|
|
||||||
static TOOL_ACTION showInspector;
|
static TOOL_ACTION showInspector;
|
||||||
static TOOL_ACTION previewSettings;
|
static TOOL_ACTION previewSettings;
|
||||||
|
|
||||||
|
|
|
@ -119,18 +119,6 @@ int PL_EDITOR_CONTROL::Plot( const TOOL_EVENT& aEvent )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int PL_EDITOR_CONTROL::ToggleBackgroundColor( const TOOL_EVENT& aEvent )
|
|
||||||
{
|
|
||||||
m_frame->SetDrawBgColor( m_frame->GetDrawBgColor() == WHITE ? BLACK : WHITE );
|
|
||||||
getView()->GetPainter()->GetSettings()->SetBackgroundColor( m_frame->GetDrawBgColor() );
|
|
||||||
|
|
||||||
m_frame->GetCanvas()->GetView()->UpdateAllLayersColor();
|
|
||||||
m_frame->GetCanvas()->Refresh();
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int PL_EDITOR_CONTROL::ShowInspector( const TOOL_EVENT& aEvent )
|
int PL_EDITOR_CONTROL::ShowInspector( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
m_frame->ShowDesignInspector();
|
m_frame->ShowDesignInspector();
|
||||||
|
@ -194,7 +182,6 @@ void PL_EDITOR_CONTROL::setTransitions()
|
||||||
Go( &PL_EDITOR_CONTROL::Plot, ACTIONS::plot.MakeEvent() );
|
Go( &PL_EDITOR_CONTROL::Plot, ACTIONS::plot.MakeEvent() );
|
||||||
|
|
||||||
Go( &PL_EDITOR_CONTROL::PageSetup, PL_ACTIONS::previewSettings.MakeEvent() );
|
Go( &PL_EDITOR_CONTROL::PageSetup, PL_ACTIONS::previewSettings.MakeEvent() );
|
||||||
Go( &PL_EDITOR_CONTROL::ToggleBackgroundColor, PL_ACTIONS::toggleBackground.MakeEvent() );
|
|
||||||
Go( &PL_EDITOR_CONTROL::ShowInspector, PL_ACTIONS::showInspector.MakeEvent() );
|
Go( &PL_EDITOR_CONTROL::ShowInspector, PL_ACTIONS::showInspector.MakeEvent() );
|
||||||
Go( &PL_EDITOR_CONTROL::TitleBlockDisplayMode, PL_ACTIONS::layoutEditMode.MakeEvent() );
|
Go( &PL_EDITOR_CONTROL::TitleBlockDisplayMode, PL_ACTIONS::layoutEditMode.MakeEvent() );
|
||||||
Go( &PL_EDITOR_CONTROL::TitleBlockDisplayMode, PL_ACTIONS::layoutNormalMode.MakeEvent() );
|
Go( &PL_EDITOR_CONTROL::TitleBlockDisplayMode, PL_ACTIONS::layoutNormalMode.MakeEvent() );
|
||||||
|
|
|
@ -60,7 +60,6 @@ public:
|
||||||
int Print( const TOOL_EVENT& aEvent );
|
int Print( const TOOL_EVENT& aEvent );
|
||||||
int Plot( const TOOL_EVENT& aEvent );
|
int Plot( const TOOL_EVENT& aEvent );
|
||||||
|
|
||||||
int ToggleBackgroundColor( const TOOL_EVENT& aEvent );
|
|
||||||
int ShowInspector( const TOOL_EVENT& aEvent );
|
int ShowInspector( const TOOL_EVENT& aEvent );
|
||||||
int TitleBlockDisplayMode( const TOOL_EVENT& aEvent );
|
int TitleBlockDisplayMode( const TOOL_EVENT& aEvent );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue