[gnome-shell] Fade in alt-tab popup, adjust timings
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Fade in alt-tab popup, adjust timings
- Date: Wed, 16 Jun 2010 18:59:25 +0000 (UTC)
commit 6e09cc5fc85f9c02a01ecb2de1f9d9f1a342be51
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Jun 10 17:22:23 2010 +0200
Fade in alt-tab popup, adjust timings
The design calls for item to not appear abruptly, but not too slow
either - 100ms seems to be a good sweet spot for elements which are
supposed to appear "instantly".
Add a fade effect to the alt-tab popup and set the timings for other
fade effects to 100ms.
https://bugzilla.gnome.org/show_bug.cgi?id=621247
js/ui/altTab.js | 21 +++++++++++++++++++--
js/ui/runDialog.js | 2 +-
js/ui/workspace.js | 5 +++--
js/ui/workspaceSwitcherPopup.js | 2 +-
4 files changed, 24 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/altTab.js b/js/ui/altTab.js
index da6b982..028dc5b 100644
--- a/js/ui/altTab.js
+++ b/js/ui/altTab.js
@@ -15,12 +15,13 @@ const Tweener = imports.ui.tweener;
const POPUP_APPICON_SIZE = 96;
const POPUP_SCROLL_TIME = 0.10; // seconds
+const POPUP_FADE_TIME = 0.1; // seconds
const DISABLE_HOVER_TIMEOUT = 500; // milliseconds
const THUMBNAIL_DEFAULT_SIZE = 256;
const THUMBNAIL_POPUP_TIME = 500; // milliseconds
-const THUMBNAIL_FADE_TIME = 0.2; // seconds
+const THUMBNAIL_FADE_TIME = 0.1; // seconds
const iconSizes = [96, 64, 48, 32, 22];
@@ -180,6 +181,14 @@ AltTabPopup.prototype = {
return false;
}
+ this.actor.opacity = 0;
+ this.actor.show();
+ Tweener.addTween(this.actor,
+ { opacity: 255,
+ time: POPUP_FADE_TIME,
+ transition: 'easeOutQuad'
+ });
+
return true;
},
@@ -352,7 +361,15 @@ AltTabPopup.prototype = {
},
destroy : function() {
- this.actor.destroy();
+ Tweener.addTween(this.actor,
+ { opacity: 0,
+ time: POPUP_FADE_TIME,
+ transition: 'easeOutQuad',
+ onComplete: Lang.bind(this,
+ function() {
+ this.actor.destroy();
+ })
+ });
},
_onDestroy : function() {
diff --git a/js/ui/runDialog.js b/js/ui/runDialog.js
index 28615b5..726d382 100644
--- a/js/ui/runDialog.js
+++ b/js/ui/runDialog.js
@@ -21,7 +21,7 @@ const MAX_FILE_DELETED_BEFORE_INVALID = 10;
const HISTORY_KEY = 'run_dialog/history';
const HISTORY_LIMIT = 512;
-const DIALOG_FADE_TIME = 0.2;
+const DIALOG_FADE_TIME = 0.1;
function CommandCompleter() {
this._init();
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index e917b8d..7b59069 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -28,7 +28,8 @@ FRAME_COLOR.from_pixel(0xffffffff);
const SCROLL_SCALE_AMOUNT = 100 / 5;
-const LIGHTBOX_FADE_TIME = 0.2;
+const LIGHTBOX_FADE_TIME = 0.1;
+const CLOSE_BUTTON_FADE_TIME = 0.1;
const DRAGGING_WINDOW_OPACITY = 100;
@@ -441,7 +442,7 @@ WindowOverlay.prototype = {
this._parentActor.raise_top();
Tweener.addTween(this.title,
{ opacity: 255,
- time: Overview.ANIMATION_TIME,
+ time: CLOSE_BUTTON_FADE_TIME,
transition: 'easeOutQuad' });
},
diff --git a/js/ui/workspaceSwitcherPopup.js b/js/ui/workspaceSwitcherPopup.js
index 55d4601..ac39544 100644
--- a/js/ui/workspaceSwitcherPopup.js
+++ b/js/ui/workspaceSwitcherPopup.js
@@ -9,7 +9,7 @@ const Main = imports.ui.main;
const Tweener = imports.ui.tweener;
-const ANIMATION_TIME = 0.075;
+const ANIMATION_TIME = 0.1;
const DISPLAY_TIMEOUT = 600;
const LEFT = -1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]