From 826682cc07cebef66b4a7a60c916802dcd64e550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org> Date: Tue, 17 Mar 2015 15:47:27 +0100 Subject: [PATCH] theme: Style .selected menu items instead of :focus/:hover The .selected style class indicates the "active" menu item, which is generally the last hovered or focused one (whichever happened last). Styling that instead of :focus and :hover directly guarantees that only a single item will be selected at a time, which removes ambiguity and matches the behavior of GTK+ menus. https://bugzilla.gnome.org/show_bug.cgi?id=745246 --- data/theme/gnome-shell-high-contrast.css | 4 +--- data/theme/gnome-shell-sass | 2 +- data/theme/gnome-shell.css | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/data/theme/gnome-shell-high-contrast.css b/data/theme/gnome-shell-high-contrast.css index c2160c262..4753bf9aa 100644 --- a/data/theme/gnome-shell-high-contrast.css +++ b/data/theme/gnome-shell-high-contrast.css @@ -393,7 +393,7 @@ StScrollBar { background-color: black; box-shadow: inset 0 1px 0px #0d0d0d; font-weight: bold; } - .popup-menu .popup-menu-item:hover, .popup-menu .popup-menu-item:focus { + .popup-menu .popup-menu-item.selected { background-color: rgba(255, 255, 255, 0.1); color: #fff; } .popup-menu .popup-menu-item:active { @@ -401,8 +401,6 @@ StScrollBar { color: #ffffff; } .popup-menu .popup-menu-item:insensitive { color: rgba(255, 255, 255, 0.5); } - .popup-menu .selected { - background-color: #215d9c; } .popup-menu .popup-inactive-menu-item { color: #fff; } .popup-menu .popup-inactive-menu-item:insensitive { diff --git a/data/theme/gnome-shell-sass b/data/theme/gnome-shell-sass index bc0a7a9fc..a84637bf5 160000 --- a/data/theme/gnome-shell-sass +++ b/data/theme/gnome-shell-sass @@ -1 +1 @@ -Subproject commit bc0a7a9fcdc32bf79679542dba41a4a6de5615f1 +Subproject commit a84637bf55bca3b515bc5602cf02ec48b8450dfd diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css index 27088943f..d787017bc 100644 --- a/data/theme/gnome-shell.css +++ b/data/theme/gnome-shell.css @@ -393,7 +393,7 @@ StScrollBar { background-color: #343a3a; box-shadow: inset 0 1px 0px #282c2c; font-weight: bold; } - .popup-menu .popup-menu-item:hover, .popup-menu .popup-menu-item:focus { + .popup-menu .popup-menu-item.selected { background-color: rgba(238, 238, 236, 0.1); color: #eeeeec; } .popup-menu .popup-menu-item:active { @@ -401,8 +401,6 @@ StScrollBar { color: #ffffff; } .popup-menu .popup-menu-item:insensitive { color: rgba(238, 238, 236, 0.5); } - .popup-menu .selected { - background-color: #215d9c; } .popup-menu .popup-inactive-menu-item { color: #eeeeec; } .popup-menu .popup-inactive-menu-item:insensitive {