Browse Source

Use footprint color scheme for CvPcb footprint viewer panel

Fixes #4375
pull/16/head
Jon Evans 6 years ago
parent
commit
960ce4aa67
  1. 12
      cvpcb/display_footprints_frame.cpp
  2. 2
      cvpcb/display_footprints_frame.h
  3. 0
      include/footprint_editor_settings.h

12
cvpcb/display_footprints_frame.cpp

@ -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();
}

2
cvpcb/display_footprints_frame.h

@ -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

0
pcbnew/footprint_editor_settings.h → include/footprint_editor_settings.h

Loading…
Cancel
Save