[gnome-shell] altTab: make thumbnails scroll to right if needed at first Alt+Shift+Above_Tab
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] altTab: make thumbnails scroll to right if needed at first Alt+Shift+Above_Tab
- Date: Tue, 6 Sep 2011 18:31:17 +0000 (UTC)
commit 28bb0c1fb2fe6e8f8f6560fe885af46a13d37e6f
Author: Rui Matos <tiagomatos gmail com>
Date: Thu Jul 21 18:58:43 2011 +0100
altTab: make thumbnails scroll to right if needed at first Alt+Shift+Above_Tab
Force an allocation at thumbnails creation so we can figure out whether we
need to scroll when selecting.
We also need to show() the whole AltTabPopup before calling _select() so that,
when computing the scrolling offset, the widgets already have their styles
loaded. Otherwise we will miss the switcher list item container's spacing.
https://bugzilla.gnome.org/show_bug.cgi?id=655069
js/ui/altTab.js | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/altTab.js b/js/ui/altTab.js
index 0d2ae39..cbe6f6c 100644
--- a/js/ui/altTab.js
+++ b/js/ui/altTab.js
@@ -147,6 +147,8 @@ AltTabPopup.prototype = {
// Need to force an allocation so we can figure out whether we
// need to scroll when selecting
+ this.actor.opacity = 0;
+ this.actor.show();
this.actor.get_allocation_box();
// Make the initial selection
@@ -186,7 +188,7 @@ AltTabPopup.prototype = {
// disturbed by the popup briefly flashing.
this._initialDelayTimeoutId = Mainloop.timeout_add(POPUP_DELAY_TIMEOUT,
Lang.bind(this, function () {
- this.actor.show();
+ this.actor.opacity = 255;
this._initialDelayTimeoutId = 0;
}));
@@ -479,6 +481,10 @@ AltTabPopup.prototype = {
this.actor.add_actor(this._thumbnails.actor);
+ // Need to force an allocation so we can figure out whether we
+ // need to scroll when selecting
+ this._thumbnails.actor.get_allocation_box();
+
this._thumbnails.actor.opacity = 0;
Tweener.addTween(this._thumbnails.actor,
{ opacity: 255,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]