Use the eeschema color theme for the symbol preview canvas
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4484
This commit is contained in:
parent
7d537e83ea
commit
5a9e69b146
|
@ -66,6 +66,10 @@ SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET( wxWindow* aParent, KIWAY& aKiway,
|
||||||
// before any OnPaint event is fired for the canvas using a wrong bg color
|
// before any OnPaint event is fired for the canvas using a wrong bg color
|
||||||
KIGFX::VIEW* view = m_preview->GetView();
|
KIGFX::VIEW* view = m_preview->GetView();
|
||||||
auto settings = static_cast<KIGFX::SCH_RENDER_SETTINGS*>( view->GetPainter()->GetSettings() );
|
auto settings = static_cast<KIGFX::SCH_RENDER_SETTINGS*>( view->GetPainter()->GetSettings() );
|
||||||
|
|
||||||
|
if( auto* theme = Pgm().GetSettingsManager().GetColorSettings( app_settings->m_ColorTheme ) )
|
||||||
|
settings->LoadColors( theme );
|
||||||
|
|
||||||
m_preview->GetGAL()->SetClearColor( settings->GetBackgroundColor() );
|
m_preview->GetGAL()->SetClearColor( settings->GetBackgroundColor() );
|
||||||
|
|
||||||
SetBackgroundColour( *wxWHITE );
|
SetBackgroundColour( *wxWHITE );
|
||||||
|
|
Loading…
Reference in New Issue