AButton: decouple indicator color and active state.
authorRobin Gareus <robin@gareus.org>
Tue, 17 Mar 2015 01:08:41 +0000 (02:08 +0100)
committerRobin Gareus <robin@gareus.org>
Tue, 17 Mar 2015 01:08:41 +0000 (02:08 +0100)
If a custom LED color is used, the LED does not
reflect the ExplicitActive state. Hence the
Body Element (if visible) should be used just like
for buttons without LED indicator.

gtk2_ardour/ardour_button.cc

index a0f9a4a3896206108edfd4c18386e3ffd0fe4762..921828c5bb89ec1bf65bfee493971a336fd5dc26 100644 (file)
@@ -272,7 +272,7 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *)
 
        //show the "convex" or "concave" gradient
        if (!_flat_buttons) {
-               if ( active_state() == Gtkmm2ext::ExplicitActive && !((_elements & Indicator)==Indicator) ) {
+               if ( active_state() == Gtkmm2ext::ExplicitActive && ( !((_elements & Indicator)==Indicator) || use_custom_led_color) ) {
                        //concave
                        cairo_set_source (cr, concave_pattern);
                        Gtkmm2ext::rounded_rectangle (cr, 1, 1, get_width() - 2, get_height() - 2, _corner_radius);