diff options
author | Robin Gareus <robin@gareus.org> | 2015-03-16 19:03:41 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-03-16 19:04:36 +0100 |
commit | 28e4708825c1093ab128856e22ed468635b64f54 (patch) | |
tree | 05fcb9fb0e1e85dd8b152e3c30f62e0a99d97d8f /gtk2_ardour/ardour_button.cc | |
parent | d57546dea2e23cc31f5c2c46fa43b7aa82935677 (diff) |
AButton: allow to set custom LED color (for > 2 states)
Diffstat (limited to 'gtk2_ardour/ardour_button.cc')
-rw-r--r-- | gtk2_ardour/ardour_button.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_button.cc b/gtk2_ardour/ardour_button.cc index fcc9f1088e..a0f9a4a389 100644 --- a/gtk2_ardour/ardour_button.cc +++ b/gtk2_ardour/ardour_button.cc @@ -77,6 +77,8 @@ ArdourButton::ArdourButton (Element e) , text_inactive_color(0) , led_active_color(0) , led_inactive_color(0) + , led_custom_color (0) + , use_custom_led_color (false) , convex_pattern (0) , concave_pattern (0) , led_inset_pattern (0) @@ -113,6 +115,8 @@ ArdourButton::ArdourButton (const std::string& str, Element e) , text_inactive_color(0) , led_active_color(0) , led_inactive_color(0) + , led_custom_color (0) + , use_custom_led_color (false) , convex_pattern (0) , concave_pattern (0) , led_inset_pattern (0) @@ -209,6 +213,10 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *) led_color = led_inactive_color; } + if (use_custom_led_color) { + led_color = led_custom_color; + } + void (*rounded_function)(cairo_t*, double, double, double, double, double); switch (_corner_mask) { |