popupMenu: Use .selected class for active item

Currently it uses .active, which matches the code more closely, but
is confusingly close to :active; so .selected it is ...

https://bugzilla.gnome.org/show_bug.cgi?id=745246
This commit is contained in:
Florian Müllner 2015-03-16 16:52:53 +01:00
parent e4a20e51e2
commit 8b6e566728
4 changed files with 5 additions and 5 deletions

View File

@ -401,7 +401,7 @@ StScrollBar {
color: #ffffff; }
.popup-menu .popup-menu-item:insensitive {
color: rgba(255, 255, 255, 0.5); }
.popup-menu .active {
.popup-menu .selected {
background-color: #215d9c; }
.popup-menu .popup-inactive-menu-item {
color: #fff; }

@ -1 +1 @@
Subproject commit e7f8bec7ef161e42ad3678aca0b99e13298af7ff
Subproject commit bc0a7a9fcdc32bf79679542dba41a4a6de5615f1

View File

@ -401,7 +401,7 @@ StScrollBar {
color: #ffffff; }
.popup-menu .popup-menu-item:insensitive {
color: rgba(238, 238, 236, 0.5); }
.popup-menu .active {
.popup-menu .selected {
background-color: #215d9c; }
.popup-menu .popup-inactive-menu-item {
color: #eeeeec; }

View File

@ -169,10 +169,10 @@ const PopupBaseMenuItem = new Lang.Class({
if (activeChanged) {
this.active = active;
if (active) {
this.actor.add_style_class_name('active');
this.actor.add_style_class_name('selected');
this.actor.grab_key_focus();
} else {
this.actor.remove_style_class_name('active');
this.actor.remove_style_class_name('selected');
// Remove the CSS active state if the user press the button and
// while holding moves to another menu item, so we don't paint all items.
// The correct behaviour would be to set the new item with the CSS