[gnome-shell/wip/sass: 59/90] popup: Include active item as part of the submenu
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/sass: 59/90] popup: Include active item as part of the submenu
- Date: Wed, 18 Feb 2015 20:45:19 +0000 (UTC)
commit 10be5be2e47af5e863f17f6c94b5bb2f6e12608a
Author: Carlos Soriano <csoriano gnome org>
Date: Wed Jan 21 17:14:42 2015 +0100
popup: Include active item as part of the submenu
data/theme/_common.scss | 7 +++++--
data/theme/gnome-shell-high-contrast.css | 6 ++++--
data/theme/gnome-shell.css | 6 ++++--
js/ui/popupMenu.js | 2 ++
4 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/data/theme/_common.scss b/data/theme/_common.scss
index f3c68c7..5504222 100644
--- a/data/theme/_common.scss
+++ b/data/theme/_common.scss
@@ -412,8 +412,7 @@ StScrollBar {
.popup-menu-arrow { } //defined globally in the TOP BAR
.popup-sub-menu {
background-color: darken($bg_color,2%);
- border-top: 1px solid lighten($borders_color,5%);
- border-bottom: 1px solid lighten($borders_color,5%);
+ box-shadow: inset 0 -1px 0px lighten($borders_color,5%);
}
.popup-menu-content { padding: 1em 0em; }
@@ -422,6 +421,10 @@ StScrollBar {
&:ltr { padding: .4em 1.75em .4em 0em; }
&:rtl { padding: .4em 0em .4em 1.75em; }
+ &:checked {
+ background-color: darken($bg_color,2%);
+ box-shadow: inset 0 1px 0px lighten($borders_color,5%);
+ }
&:active { background-color: $selected_bg_color; }
&:insensitive { background-color: transparentize($bg_color,.5); }
}
diff --git a/data/theme/gnome-shell-high-contrast.css b/data/theme/gnome-shell-high-contrast.css
index 2151e55..0c21596 100644
--- a/data/theme/gnome-shell-high-contrast.css
+++ b/data/theme/gnome-shell-high-contrast.css
@@ -751,8 +751,7 @@ StScrollBar {
min-width: 200px; }
.popup-menu .popup-sub-menu {
background-color: black;
- border-top: 1px solid #0d0d0d;
- border-bottom: 1px solid #0d0d0d; }
+ box-shadow: inset 0 -1px 0px #0d0d0d; }
.popup-menu .popup-menu-content {
padding: 1em 0em; }
.popup-menu .popup-menu-item {
@@ -761,6 +760,9 @@ StScrollBar {
padding: .4em 1.75em .4em 0em; }
.popup-menu .popup-menu-item:rtl {
padding: .4em 0em .4em 1.75em; }
+ .popup-menu .popup-menu-item:checked {
+ background-color: black;
+ box-shadow: inset 0 1px 0px #0d0d0d; }
.popup-menu .popup-menu-item:active {
background-color: #215d9c; }
.popup-menu .popup-menu-item:insensitive {
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index 40c5f79..7aa4c28 100644
--- a/data/theme/gnome-shell.css
+++ b/data/theme/gnome-shell.css
@@ -751,8 +751,7 @@ StScrollBar {
min-width: 200px; }
.popup-menu .popup-sub-menu {
background-color: #343a3a;
- border-top: 1px solid #282c2c;
- border-bottom: 1px solid #282c2c; }
+ box-shadow: inset 0 -1px 0px #282c2c; }
.popup-menu .popup-menu-content {
padding: 1em 0em; }
.popup-menu .popup-menu-item {
@@ -761,6 +760,9 @@ StScrollBar {
padding: .4em 1.75em .4em 0em; }
.popup-menu .popup-menu-item:rtl {
padding: .4em 0em .4em 1.75em; }
+ .popup-menu .popup-menu-item:checked {
+ background-color: #343a3a;
+ box-shadow: inset 0 1px 0px #282c2c; }
.popup-menu .popup-menu-item:active {
background-color: #215d9c; }
.popup-menu .popup-menu-item:insensitive {
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index 524191e..5b0db03 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -1075,10 +1075,12 @@ const PopupSubMenuMenuItem = new Lang.Class({
this.actor.add_style_pseudo_class('open');
this._getTopMenu()._setOpenedSubMenu(this.menu);
this.actor.add_accessible_state (Atk.StateType.EXPANDED);
+ this.actor.add_style_pseudo_class('checked');
} else {
this.actor.remove_style_pseudo_class('open');
this._getTopMenu()._setOpenedSubMenu(null);
this.actor.remove_accessible_state (Atk.StateType.EXPANDED);
+ this.actor.remove_style_pseudo_class('checked');
}
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]