mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
[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
This commit is contained in:
parent
266a0fb7d6
commit
88211ed4bb
1 changed files with 6 additions and 4 deletions
|
|
@ -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();
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue