[gnome-shell] popup-sub-menu: Adjust scrollbar style
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] popup-sub-menu: Adjust scrollbar style
- Date: Mon, 4 Apr 2011 19:58:20 +0000 (UTC)
commit d25418ba0469eedcd1b0cc48142104aab6817675
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Apr 4 14:55:15 2011 +0200
popup-sub-menu: Adjust scrollbar style
Slightly adjust the style, so that scrollbars in submenus look
slightly less disconnected from the scrolled content.
https://bugzilla.gnome.org/show_bug.cgi?id=646001
data/theme/gnome-shell.css | 21 +++++++++++++++++++++
js/ui/popupMenu.js | 5 +++--
2 files changed, 24 insertions(+), 2 deletions(-)
---
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index d540340..ae7f59b 100644
--- a/data/theme/gnome-shell.css
+++ b/data/theme/gnome-shell.css
@@ -113,6 +113,27 @@ StTooltip StLabel {
box-shadow: inset 0px 2px 4px rgba(0,0,0,0.9);
}
+.popup-sub-menu .popup-menu-item:ltr {
+ padding-right: 0em;
+}
+
+.popup-sub-menu .popup-menu-item:rtl {
+ padding-left: 0em;
+}
+
+.popup-sub-menu StScrollBar {
+ padding: 4px;
+}
+
+.popup-sub-menu StScrollBar StBin#trough {
+ border-width: 0px;
+}
+
+.popup-sub-menu StScrollBar StBin#vhandle {
+ background-color: #4c4c4c;
+ border-width: 0px;
+}
+
/* The remaining popup-menu sizing is all done in ems, so that if you
* override .popup-menu.font-size, everything else will scale with it.
*/
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index 2bc388f..8f76ed6 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -1042,7 +1042,7 @@ PopupSubMenu.prototype = {
__proto__: PopupMenuBase.prototype,
_init: function(sourceActor, sourceArrow) {
- PopupMenuBase.prototype._init.call(this, sourceActor, 'popup-sub-menu');
+ PopupMenuBase.prototype._init.call(this, sourceActor);
this._arrow = sourceArrow;
this._arrow.rotation_center_z_gravity = Clutter.Gravity.CENTER;
@@ -1050,7 +1050,8 @@ PopupSubMenu.prototype = {
// Since a function of a submenu might be to provide a "More.." expander
// with long content, we make it scrollable - the scrollbar will only take
// effect if a CSS max-height is set on the top menu.
- this.actor = new St.ScrollView({ hscrollbar_policy: Gtk.PolicyType.NEVER,
+ this.actor = new St.ScrollView({ style_class: 'popup-sub-menu',
+ hscrollbar_policy: Gtk.PolicyType.NEVER,
vscrollbar_policy: Gtk.PolicyType.NEVER });
// StScrollbar plays dirty tricks with events, calling
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]