Use footprint color scheme for CvPcb footprint viewer panel

Fixes #4375
This commit is contained in:
Jon Evans 2020-05-08 17:05:29 -04:00
parent 35f3eb6220
commit 960ce4aa67
3 changed files with 14 additions and 0 deletions

View File

@ -29,6 +29,7 @@
#include <common.h>
#include <confirm.h>
#include <cvpcb_settings.h>
#include <footprint_editor_settings.h>
#include <fp_lib_table.h>
#include <id.h>
#include <lib_id.h>
@ -36,6 +37,8 @@
#include <msgpanel.h>
#include <pcb_draw_panel_gal.h>
#include <pcb_painter.h>
#include <pgm_base.h>
#include <settings/settings_manager.h>
#include <tool/action_toolbar.h>
#include <tool/common_tools.h>
#include <tool/tool_dispatcher.h>
@ -452,3 +455,12 @@ void DISPLAY_FOOTPRINTS_FRAME::SyncToolbars()
}
COLOR_SETTINGS* DISPLAY_FOOTPRINTS_FRAME::ColorSettings()
{
auto* settings = Pgm().GetSettingsManager().GetAppSettings<FOOTPRINT_EDITOR_SETTINGS>();
if( settings )
return Pgm().GetSettingsManager().GetColorSettings( settings->m_ColorTheme );
else
return Pgm().GetSettingsManager().GetColorSettings();
}

View File

@ -80,6 +80,8 @@ public:
bool GetAutoZoom() const { return m_autoZoom; }
void SetAutoZoom( bool aEnable ) { m_autoZoom = aEnable; }
COLOR_SETTINGS* ColorSettings() override;
/**
* Function GetGridColor() , virtual
* @return the color of the grid