From 607e7f3b9e1af4307b58f0c13c91be5a5dd9e8e3 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 31 Dec 2016 20:57:07 +0100 Subject: [PATCH] Fix flat buttons for the shuttle-ctrl --- gtk2_ardour/shuttle_control.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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);