workspacesView: Don't change opacity during dnd

We used used to indicate to the user the ability to move to another workspace
during dnd by highligthing the adjacent workspaces on hover.

This was done by changing the workspace's opacity to 200 and set it to
255 for the highlighted adjacent ones.

This is now no longer needed as the design was completely changed since
then (overview relayout; we no longer represent workspaces in the way
we did before) and introduces a bug where we don't properly reset the
opacity after the drag action, so just remove that code.

https://bugzilla.gnome.org/show_bug.cgi?id=648983
This commit is contained in:
Adel Gadllah 2011-04-29 23:19:13 +02:00
parent 20bf53add1
commit 56d584b7c6

View File

@ -201,12 +201,10 @@ WorkspacesView.prototype = {
Tweener.removeTweens(workspace.actor);
let opacity = (this._inDrag && w != active) ? 200 : 255;
let y = (w - active) * (this._height + this._spacing + this._workspaceRatioSpacing);
if (showAnimation) {
let params = { y: y,
opacity: opacity,
time: WORKSPACE_SWITCH_TIME,
transition: 'easeOutQuad'
};
@ -224,7 +222,6 @@ WorkspacesView.prototype = {
Tweener.addTween(workspace.actor, params);
} else {
workspace.actor.set_position(0, y);
workspace.actor.opacity = opacity;
if (w == 0)
this._updateVisibility();
}
@ -439,20 +436,14 @@ WorkspacesView.prototype = {
if (topWorkspace) {
if (topWorkspace.actor.contains(dragEvent.targetActor)) {
hoverWorkspace = topWorkspace;
topWorkspace.opacity = topWorkspace.actor.opacity = 255;
result = topWorkspace.handleDragOver(dragEvent.source, dragEvent.dragActor);
} else {
topWorkspace.opacity = topWorkspace.actor.opacity = 200;
}
}
if (bottomWorkspace) {
if (bottomWorkspace.actor.contains(dragEvent.targetActor)) {
hoverWorkspace = bottomWorkspace;
bottomWorkspace.opacity = bottomWorkspace.actor.opacity = 255;
result = bottomWorkspace.handleDragOver(dragEvent.source, dragEvent.dragActor);
} else {
bottomWorkspace.opacity = bottomWorkspace.actor.opacity = 200;
}
}