summaryrefslogtreecommitdiff
path: root/gtk2_ardour/shuttle_control.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-05-18 05:32:41 +0000
committerDavid Robillard <d@drobilla.net>2011-05-18 05:32:41 +0000
commit297a51b715bb4ed012b9b21bcbed08049796345f (patch)
tree8c887c69a5962676ebaa973a66de6b06e6dc743a /gtk2_ardour/shuttle_control.cc
parent7c7afd08b92151746dd25f275d28c0c00306a6be (diff)
Make shuttle colour a configuration option.
Make default shuttle colour match clock text green. This is a bit odd, since it is a "canvas variable", except not... all the other colours are in this section though. Maybe they're more appropriately named "colours", but it's too late for that now, or maybe this option belongs elsewhere, but when we need new mechanism for that... git-svn-id: svn://localhost/ardour2/branches/3.0@9553 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/shuttle_control.cc')
-rw-r--r--gtk2_ardour/shuttle_control.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk2_ardour/shuttle_control.cc b/gtk2_ardour/shuttle_control.cc
index 3a0572cd69..c4c1da6aeb 100644
--- a/gtk2_ardour/shuttle_control.cc
+++ b/gtk2_ardour/shuttle_control.cc
@@ -29,6 +29,7 @@
#include "gtkmm2ext/gui_thread.h"
#include "ardour_ui.h"
+#include "rgb_macros.h"
#include "shuttle_control.h"
#include "i18n.h"
@@ -103,8 +104,13 @@ ShuttleControl::on_size_allocate (Gtk::Allocation& alloc)
/* add 3 color stops */
+ uint32_t col = ARDOUR_UI::config()->canvasvar_Shuttle.get();
+
+ int r,b,g,a;
+ UINT_TO_RGBA(col, &r, &g, &b, &a);
+
cairo_pattern_add_color_stop_rgb (pattern, 0.0, 0, 0, 0);
- cairo_pattern_add_color_stop_rgb (pattern, 0.5, 0.0, 0.0, 1.0);
+ cairo_pattern_add_color_stop_rgb (pattern, 0.5, r/255.0, g/255.0, b/255.0);
cairo_pattern_add_color_stop_rgb (pattern, 1.0, 0, 0, 0);
DrawingArea::on_size_allocate (alloc);