panel-button: Set ':active' pseudo class when menu is open

Commit c86a977564 removed :pressed from the list of styles which
highlight panel buttons, so the button highlight is now lost when
mousing over menu items. This is not the behavior we want, the
buttons should keep their highlight while being "active". Rather
than adding back the pseudo class to the CSS, let buttons use the
:active pseudo class when the menu is open, which makes more sense
than :pressed anyway.
This commit is contained in:
Florian Müllner 2011-02-08 19:46:05 +01:00
parent 1f154f6638
commit 4450385458

View File

@ -48,9 +48,9 @@ Button.prototype = {
_onOpenStateChanged: function(menu, open) {
if (open)
this.actor.add_style_pseudo_class('pressed');
this.actor.add_style_pseudo_class('active');
else
this.actor.remove_style_pseudo_class('pressed');
this.actor.remove_style_pseudo_class('active');
}
};