[linearView] Update workspace opacity

While zoomed out in drag mode, the workspaces at the left and right
of the active workspace are slightly transparent - when switching
workspaces, one of the transparent workspaces becomes the new active
workspace, but its opacity is not updated.

https://bugzilla.gnome.org/show_bug.cgi?id=620940
This commit is contained in:
Florian Müllner 2010-06-08 02:43:32 +02:00
parent 7514dfaef9
commit d8f7629a4f

View File

@ -794,6 +794,7 @@ SingleView.prototype = {
_scrollToActive: function(showAnimation) { _scrollToActive: function(showAnimation) {
let active = global.screen.get_active_workspace_index(); let active = global.screen.get_active_workspace_index();
this._computeWorkspacePositions();
this._updateWorkspaceActors(showAnimation); this._updateWorkspaceActors(showAnimation);
this._scrollScrollBarToIndex(active, showAnimation); this._scrollScrollBarToIndex(active, showAnimation);
}, },
@ -1210,18 +1211,18 @@ SingleView.prototype = {
if (leftWorkspace) { if (leftWorkspace) {
if (dragEvent.targetActor == this._leftShadow) { if (dragEvent.targetActor == this._leftShadow) {
hoverWorkspace = leftWorkspace; hoverWorkspace = leftWorkspace;
leftWorkspace.actor.opacity = 255; leftWorkspace.opacity = leftWorkspace.actor.opacity = 255;
} else { } else {
leftWorkspace.actor.opacity = 200; leftWorkspace.opacity = leftWorkspace.actor.opacity = 200;
} }
} }
if (rightWorkspace) { if (rightWorkspace) {
if (dragEvent.targetActor == this._rightShadow) { if (dragEvent.targetActor == this._rightShadow) {
hoverWorkspace = rightWorkspace; hoverWorkspace = rightWorkspace;
rightWorkspace.actor.opacity = 255; rightWorkspace.opacity = rightWorkspace.actor.opacity = 255;
} else { } else {
rightWorkspace.actor.opacity = 200; rightWorkspace.opacity = rightWorkspace.actor.opacity = 200;
} }
} else { } else {
let targetParent = dragEvent.targetActor.get_parent(); let targetParent = dragEvent.targetActor.get_parent();