From 88211ed4bbca83631532af1cf2ccb05d5f1091ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sat, 8 May 2010 23:45:09 +0200 Subject: [PATCH] [linearView] Animate scroll bar size changes When adding/removing workspaces in linear view, both workspaces and scrollbar movement are animated, but the size of the scrollbar handle changes abruptly. It is more consistent to animate the size change as well. https://bugzilla.gnome.org/show_bug.cgi?id=613456 --- js/ui/workspacesView.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index 44f721d02..3d3519d22 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -1057,7 +1057,11 @@ SingleView.prototype = { lostWorkspaces[l].disconnectAll(); if (this._scroll != null) - this._scroll.adjustment.upper = newNumWorkspaces; + Tweener.addTween(this._scroll.adjustment, + { upper: newNumWorkspaces, + time: WORKSPACE_SWITCH_TIME, + transition: 'easeOutQuad' + }); if (newNumWorkspaces > oldNumWorkspaces) { for (let w = oldNumWorkspaces; w < newNumWorkspaces; w++) { @@ -1070,13 +1074,11 @@ SingleView.prototype = { this._computeWorkspacePositions(); this._updateWorkspaceActors(false); - this._scrollScrollBarToIndex(active + 1, false); } else { this._lostWorkspaces = lostWorkspaces; - this._scrollScrollBarToIndex(active, false); - this._scrollToActive(true); } + this._scrollToActive(true); this._updatePanelVisibility(); },