[gnome-shell] [workspacesView] Animate showing/hiding of controls
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] [workspacesView] Animate showing/hiding of controls
- Date: Sun, 9 May 2010 08:34:02 +0000 (UTC)
commit 2ca1fe3254312935cdf7870e792d5b53c666fc0b
Author: Florian Müllner <fmuellner src gnome org>
Date: Sun May 9 02:09:17 2010 +0200
[workspacesView] Animate showing/hiding of controls
Some of the workspace view controls are hidden when the number of
workspaces is one (view toggle button, scroll bar in single view).
Use a fade effect instead of showing/hiding the control abruptly.
https://bugzilla.gnome.org/show_bug.cgi?id=613456
js/ui/workspacesView.js | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 3d3519d..99f0805 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -1373,10 +1373,10 @@ SingleView.prototype = {
_updatePanelVisibility: function() {
let showSwitches = (global.screen.n_workspaces > 1);
if (this._scroll != null) {
- if (showSwitches)
- this._scroll.show();
- else
- this._scroll.hide();
+ Tweener.addTween(this._scroll,
+ { opacity: showSwitches ? 255 : 0,
+ time: WORKSPACE_SWITCH_TIME,
+ transition: 'easeOutQuad' });
}
},
@@ -1531,10 +1531,11 @@ WorkspacesControls.prototype = {
},
_workspacesChanged: function() {
- if (global.screen.n_workspaces == 1)
- this._toggleViewButton.hide();
- else
- this._toggleViewButton.show();
+ let showToggleButton = (global.screen.n_workspaces > 1)
+ Tweener.addTween(this._toggleViewButton,
+ { opacity: showToggleButton ? 255 : 0,
+ time: WORKSPACE_SWITCH_TIME,
+ transition: 'easeOutQuad' });
this.updateControlsSensitivity();
}
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]