Improve inactive behavior of avtk_light_button
parent
70bc959f32
commit
4114e9d802
|
@ -101,9 +101,14 @@ public:
|
|||
}
|
||||
|
||||
float alpha = 0.7;
|
||||
if (mouseOver)
|
||||
if (mouseOver && active())
|
||||
alpha = 1;
|
||||
cairo_set_source_rgba(cr, _r, _g, _b, alpha);
|
||||
|
||||
if(active()) {
|
||||
cairo_set_source_rgba(cr, _r, _g, _b, alpha);
|
||||
} else {
|
||||
cairo_set_source_rgba(cr, _r, _g, _b, 0.4);
|
||||
}
|
||||
cairo_stroke(cr);
|
||||
|
||||
cairo_restore( cr );
|
||||
|
|
Loading…
Reference in New Issue