summaryrefslogtreecommitdiff
path: root/gtk2_ardour/shuttle_control.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-12-31 20:57:07 +0100
committerRobin Gareus <robin@gareus.org>2016-12-31 20:57:07 +0100
commit607e7f3b9e1af4307b58f0c13c91be5a5dd9e8e3 (patch)
tree4e3d1511f2cd0f020ab2120c0efae96819ecbbbf /gtk2_ardour/shuttle_control.cc
parentff2f224d0c89880d2ce4f2f8be3904a332a76c1c (diff)
Fix flat buttons for the shuttle-ctrl
Diffstat (limited to 'gtk2_ardour/shuttle_control.cc')
-rw-r--r--gtk2_ardour/shuttle_control.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/gtk2_ardour/shuttle_control.cc b/gtk2_ardour/shuttle_control.cc
index dcafc58892..e205c4ddd8 100644
--- a/gtk2_ardour/shuttle_control.cc
+++ b/gtk2_ardour/shuttle_control.cc
@@ -33,6 +33,9 @@
#include "gtkmm2ext/utils.h"
#include "gtkmm2ext/rgb_macros.h"
+#include "canvas/utils.h"
+#include "canvas/colors.h"
+
#include "actions.h"
#include "rgb_macros.h"
#include "shuttle_control.h"
@@ -612,7 +615,12 @@ ShuttleControl::render (cairo_t* cr, cairo_rectangle_t*)
cairo_set_source_rgba (cr, 0, 0, 0, 1);
cairo_fill(cr);
rounded_rectangle (cr, x + 1, 1, marker_size - 2, get_height() - 2, 3.5);
- cairo_set_source (cr, pattern);
+ if (_flat_buttons) {
+ uint32_t col = UIConfiguration::instance().color ("shuttle");
+ ArdourCanvas::set_source_rgba (cr, col);
+ } else {
+ cairo_set_source (cr, pattern);
+ }
if (UIConfiguration::instance().get_widget_prelight() && _hovering) {
cairo_fill_preserve (cr);
cairo_set_source_rgba (cr, 1, 1, 1, 0.15);