[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
This commit is contained in:
parent
88211ed4bb
commit
2ca1fe3254
@ -1373,10 +1373,10 @@ SingleView.prototype = {
|
|||||||
_updatePanelVisibility: function() {
|
_updatePanelVisibility: function() {
|
||||||
let showSwitches = (global.screen.n_workspaces > 1);
|
let showSwitches = (global.screen.n_workspaces > 1);
|
||||||
if (this._scroll != null) {
|
if (this._scroll != null) {
|
||||||
if (showSwitches)
|
Tweener.addTween(this._scroll,
|
||||||
this._scroll.show();
|
{ opacity: showSwitches ? 255 : 0,
|
||||||
else
|
time: WORKSPACE_SWITCH_TIME,
|
||||||
this._scroll.hide();
|
transition: 'easeOutQuad' });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1531,10 +1531,11 @@ WorkspacesControls.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_workspacesChanged: function() {
|
_workspacesChanged: function() {
|
||||||
if (global.screen.n_workspaces == 1)
|
let showToggleButton = (global.screen.n_workspaces > 1)
|
||||||
this._toggleViewButton.hide();
|
Tweener.addTween(this._toggleViewButton,
|
||||||
else
|
{ opacity: showToggleButton ? 255 : 0,
|
||||||
this._toggleViewButton.show();
|
time: WORKSPACE_SWITCH_TIME,
|
||||||
|
transition: 'easeOutQuad' });
|
||||||
this.updateControlsSensitivity();
|
this.updateControlsSensitivity();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user