summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_button.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-12-12 11:48:40 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-12-12 11:48:45 -0500
commitc2025a62a6279db53a7cfe44d4e6e9eb115bdc44 (patch)
tree248355815bc347879896260aeacae8fd2ce68f4a /gtk2_ardour/ardour_button.cc
parentec0a74276a5619856b1c6303ee160d9fca2b351b (diff)
derive ArdourButton LED inactive color from active color, rather than requiring explicit definition
Diffstat (limited to 'gtk2_ardour/ardour_button.cc')
-rw-r--r--gtk2_ardour/ardour_button.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/gtk2_ardour/ardour_button.cc b/gtk2_ardour/ardour_button.cc
index 5a13dd751f..2e9646edbf 100644
--- a/gtk2_ardour/ardour_button.cc
+++ b/gtk2_ardour/ardour_button.cc
@@ -34,6 +34,7 @@
#include "ardour/rc_configuration.h" // for widget prelight preference
#include "canvas/utils.h"
+#include "canvas/colors.h"
#include "ardour_button.h"
#include "ardour_ui.h"
@@ -680,10 +681,15 @@ ArdourButton::set_colors ()
if (failed) {
led_active_color = ARDOUR_UI::config()->color ("generic button: led active");
}
- led_inactive_color = ARDOUR_UI::config()->color (string_compose ("%1: led", name), &failed);
- if (failed) {
- led_inactive_color = ARDOUR_UI::config()->color ("generic button: led");
- }
+
+ /* The inactive color for the LED is just a fairly dark version of the
+ * active color.
+ */
+
+ ArdourCanvas::HSV inactive (led_active_color);
+ inactive.v = 0.35;
+
+ led_inactive_color = inactive.color ();
}
/**