explicit Button inactive state.
Ideally large parts of ArdourButton would become ArdourLabel, which in turn is used by ArdourButton
This commit is contained in:
parent
083620beb8
commit
78b9f65632
@ -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 ();
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user