[gnome-shell/wip/sass: 21/52] 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: 21/52] popup: Include active item as part of the submenu
- Date: Wed, 18 Feb 2015 17:05:08 +0000 (UTC)
commit c526c60f8eef29b19d1e0f9ca2c09fa9d9a8a573
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 6b179ff..42cedb9 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 3b754c4..cee1039 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 48539a8..eff6020 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]