diff --git a/gtk2_ardour/ardour_button.cc b/gtk2_ardour/ardour_button.cc index fb07ecffe9..f353edab43 100644 --- a/gtk2_ardour/ardour_button.cc +++ b/gtk2_ardour/ardour_button.cc @@ -430,7 +430,7 @@ ArdourButton::render (cairo_t* cr, cairo_rectangle_t *) } //user is currently pressing the button. black outline helps to indicate this - if ( _grabbed && !((_elements & Menu)==Menu) && _action) { + if ( _grabbed && !(_elements & (Inactive|Menu))) { cairo_set_line_width(cr,1); rounded_function (cr, 1, 1, get_width()-2, get_height()-2, _corner_radius - 1); cairo_set_source_rgba (cr, 0, 0, 0, 1.0); @@ -911,7 +911,7 @@ ArdourButton::on_key_release_event (GdkEventKey *ev) { bool ArdourButton::on_enter_notify_event (GdkEventCrossing* ev) { - _hovering = true; + _hovering = (_elements & Inactive) ? false : true; if (ARDOUR::Config->get_widget_prelight()) { queue_draw (); diff --git a/gtk2_ardour/ardour_button.h b/gtk2_ardour/ardour_button.h index c6e38aff2e..75e3a9cd90 100644 --- a/gtk2_ardour/ardour_button.h +++ b/gtk2_ardour/ardour_button.h @@ -39,6 +39,7 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable Indicator = 0x8, unused = 0x10, Menu = 0x20, + Inactive = 0x40, // no _action is defined AND state is not used }; static Element default_elements;