From 4d6317fbbb904658ed4faf94eb6b2f792078859e Mon Sep 17 00:00:00 2001
From: Ronny Eichler <ronny.eichler@gmail.com>
Date: Thu, 30 Oct 2014 17:04:35 +0100
Subject: [PATCH] GraphViewer nodes use editor color

---
 Source/Processors/Editors/GenericEditor.h | 12 +++++++++++-
 Source/UI/GraphViewer.cpp                 |  4 ++--
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/Source/Processors/Editors/GenericEditor.h b/Source/Processors/Editors/GenericEditor.h
index 064a64f9b..0b960e80d 100755
--- a/Source/Processors/Editors/GenericEditor.h
+++ b/Source/Processors/Editors/GenericEditor.h
@@ -231,6 +231,16 @@ public:
     /** Called when an editor's processor updates its settings (mainly to update channel count).*/
     virtual void update();
 
+    /** Allows other UI elements to use background color of editor. */
+    Colour getBackgroundColor() {
+        return backgroundColor;
+    }
+
+    /** Allows other elements to use background gradient of editor. */
+    ColourGradient getBackgroundGradient() {
+        return backgroundGradient;
+    }
+
     /** Called by the update() method to allow the editor to update its custom settings.*/
     virtual void updateSettings() {}
 
@@ -344,7 +354,7 @@ private:
     bool isEnabled;
     bool isCollapsed;
 
-    /**Used to determine if an editor is a splitter or Merger to avoid calling on CHannelSelector*/
+    /**Used to determine if an editor is a splitter or Merger to avoid calling on ChannelSelector*/
     bool isSplitOrMerge;
 
     int tNum;
diff --git a/Source/UI/GraphViewer.cpp b/Source/UI/GraphViewer.cpp
index 6717e7dc4..d35c82942 100644
--- a/Source/UI/GraphViewer.cpp
+++ b/Source/UI/GraphViewer.cpp
@@ -468,11 +468,11 @@ void GraphNode::paint(Graphics& g)
     }
     else
     {
-        g.setColour(Colours::lightgrey);
+        g.setColour(editor->getBackgroundColor());
         g.fillEllipse(2,2,16,16);
 
     }
 
     g.drawText(getName(), 25, 0, getWidth()-25, 20, Justification::left, true);
 
-}
\ No newline at end of file
+}
-- 
GitLab