Gerber Viewer: fix high contrast mode, respect high cycle shortcut
This commit is contained in:
parent
9911f3a943
commit
aea89a632b
|
@ -462,6 +462,7 @@ void GERBVIEW_FRAME::ApplyDisplaySettingsToGAL()
|
||||||
{
|
{
|
||||||
auto painter = static_cast<KIGFX::GERBVIEW_PAINTER*>( GetCanvas()->GetView()->GetPainter() );
|
auto painter = static_cast<KIGFX::GERBVIEW_PAINTER*>( GetCanvas()->GetView()->GetPainter() );
|
||||||
KIGFX::GERBVIEW_RENDER_SETTINGS* settings = painter->GetSettings();
|
KIGFX::GERBVIEW_RENDER_SETTINGS* settings = painter->GetSettings();
|
||||||
|
settings->SetHighContrast( gvconfig()->m_Display.m_HighContrastMode );
|
||||||
settings->LoadColors( Pgm().GetSettingsManager().GetColorSettings() );
|
settings->LoadColors( Pgm().GetSettingsManager().GetColorSettings() );
|
||||||
|
|
||||||
GetCanvas()->GetView()->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
|
GetCanvas()->GetView()->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
|
||||||
|
|
|
@ -299,7 +299,8 @@ int GERBVIEW_CONTROL::DisplayControl( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
m_frame->SetElementVisibility( LAYER_DCODES, !cfg->m_Appearance.show_dcodes );
|
m_frame->SetElementVisibility( LAYER_DCODES, !cfg->m_Appearance.show_dcodes );
|
||||||
}
|
}
|
||||||
else if( aEvent.IsAction( &ACTIONS::highContrastMode ) )
|
else if( aEvent.IsAction( &ACTIONS::highContrastMode )
|
||||||
|
|| aEvent.IsAction( &ACTIONS::highContrastModeCycle ) )
|
||||||
{
|
{
|
||||||
cfg->m_Display.m_HighContrastMode = !cfg->m_Display.m_HighContrastMode;
|
cfg->m_Display.m_HighContrastMode = !cfg->m_Display.m_HighContrastMode;
|
||||||
}
|
}
|
||||||
|
@ -490,6 +491,7 @@ void GERBVIEW_CONTROL::setTransitions()
|
||||||
Go( &GERBVIEW_CONTROL::DisplayControl, GERBVIEW_ACTIONS::negativeObjectDisplay.MakeEvent() );
|
Go( &GERBVIEW_CONTROL::DisplayControl, GERBVIEW_ACTIONS::negativeObjectDisplay.MakeEvent() );
|
||||||
Go( &GERBVIEW_CONTROL::DisplayControl, GERBVIEW_ACTIONS::dcodeDisplay.MakeEvent() );
|
Go( &GERBVIEW_CONTROL::DisplayControl, GERBVIEW_ACTIONS::dcodeDisplay.MakeEvent() );
|
||||||
Go( &GERBVIEW_CONTROL::DisplayControl, ACTIONS::highContrastMode.MakeEvent() );
|
Go( &GERBVIEW_CONTROL::DisplayControl, ACTIONS::highContrastMode.MakeEvent() );
|
||||||
|
Go( &GERBVIEW_CONTROL::DisplayControl, ACTIONS::highContrastModeCycle.MakeEvent() );
|
||||||
Go( &GERBVIEW_CONTROL::DisplayControl, GERBVIEW_ACTIONS::toggleDiffMode.MakeEvent() );
|
Go( &GERBVIEW_CONTROL::DisplayControl, GERBVIEW_ACTIONS::toggleDiffMode.MakeEvent() );
|
||||||
Go( &GERBVIEW_CONTROL::DisplayControl, GERBVIEW_ACTIONS::flipGerberView.MakeEvent() );
|
Go( &GERBVIEW_CONTROL::DisplayControl, GERBVIEW_ACTIONS::flipGerberView.MakeEvent() );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue