[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() {
|
||||
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();
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user