From 730681aabc53a318057fdf6e4a95ab8ebc7718a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sun, 10 Jan 2010 06:09:18 +0100 Subject: [PATCH] [Overview] Lightbox workspaces on menu popup Overlay a translucent rectangle to dim the workspaces/dash rather than setting the workspaces' opacity. Also slightly darken all lightboxes. https://bugzilla.gnome.org/show_bug.cgi?id=602466 --- data/theme/gnome-shell.css | 2 +- js/ui/overview.js | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css index 1f3dd03db..b77782b1e 100644 --- a/data/theme/gnome-shell.css +++ b/data/theme/gnome-shell.css @@ -1067,7 +1067,7 @@ StTooltip { } .lightbox { - background-color: rgba(0, 0, 0, 0.27); + background-color: rgba(0, 0, 0, 0.4); } /* Magnifier */ diff --git a/js/ui/overview.js b/js/ui/overview.js index 377659f8b..a0796a807 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -14,6 +14,7 @@ const _ = Gettext.gettext; const AppDisplay = imports.ui.appDisplay; const DocDisplay = imports.ui.docDisplay; const GenericDisplay = imports.ui.genericDisplay; +const Lightbox = imports.ui.lightbox; const Main = imports.ui.main; const Panel = imports.ui.panel; const Dash = imports.ui.dash; @@ -176,11 +177,19 @@ Overview.prototype = { _init : function() { this._group = new St.Group({ style_class: 'overview' }); this._group._delegate = this; + this._group.connect('destroy', Lang.bind(this, + function() { + if (this._lightbox) { + this._lightbox.destroy(); + this._lightbox = null; + } + })); this.infoBar = new InfoBar(); this._group.add_actor(this.infoBar.actor); this._workspacesManager = null; + this._lightbox = null; this.visible = false; this.animationInProgress = false; @@ -362,7 +371,10 @@ Overview.prototype = { this._activeDisplayPane.close(); return true; })); - this.workspaces.actor.opacity = 64; + if (!this._lightbox) + this._lightbox = new Lightbox.Lightbox(this._group, false); + this._lightbox.actor.show(); + this._lightbox.highlight(this._paneContainer); } else if (pane == this._activeDisplayPane) { this._activeDisplayPane = null; if (backgroundEventId != null) { @@ -371,7 +383,7 @@ Overview.prototype = { } this._transparentBackground.lower_bottom(); this._paneContainer.hide(); - this.workspaces.actor.opacity = 255; + this._lightbox.actor.hide(true); } })); },