From 960ce4aa67a220f24f0d18abb041e31d6f7a8451 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Fri, 8 May 2020 17:05:29 -0400 Subject: [PATCH] Use footprint color scheme for CvPcb footprint viewer panel Fixes #4375 --- cvpcb/display_footprints_frame.cpp | 12 ++++++++++++ cvpcb/display_footprints_frame.h | 2 ++ {pcbnew => include}/footprint_editor_settings.h | 0 3 files changed, 14 insertions(+) rename {pcbnew => include}/footprint_editor_settings.h (100%) diff --git a/cvpcb/display_footprints_frame.cpp b/cvpcb/display_footprints_frame.cpp index ae79a97e1c..75861380fb 100644 --- a/cvpcb/display_footprints_frame.cpp +++ b/cvpcb/display_footprints_frame.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -36,6 +37,8 @@ #include #include #include +#include +#include #include #include #include @@ -452,3 +455,12 @@ void DISPLAY_FOOTPRINTS_FRAME::SyncToolbars() } +COLOR_SETTINGS* DISPLAY_FOOTPRINTS_FRAME::ColorSettings() +{ + auto* settings = Pgm().GetSettingsManager().GetAppSettings(); + + if( settings ) + return Pgm().GetSettingsManager().GetColorSettings( settings->m_ColorTheme ); + else + return Pgm().GetSettingsManager().GetColorSettings(); +} diff --git a/cvpcb/display_footprints_frame.h b/cvpcb/display_footprints_frame.h index 48e757996a..d8a3ccb825 100644 --- a/cvpcb/display_footprints_frame.h +++ b/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 diff --git a/pcbnew/footprint_editor_settings.h b/include/footprint_editor_settings.h similarity index 100% rename from pcbnew/footprint_editor_settings.h rename to include/footprint_editor_settings.h