popupMenu: Use relative rotation for arrows
Currently the animation of the arrows doesn't take into account previous rotation. Since in a incoming patch we will use one arrow and rotate it to generate the four directions, we need that the animation use relative rotation. https://bugzilla.gnome.org/show_bug.cgi?id=720206
This commit is contained in:
parent
4950bad2a7
commit
a7283864e8
@ -874,7 +874,7 @@ const PopupSubMenu = new Lang.Class({
|
|||||||
this.actor.height = 0;
|
this.actor.height = 0;
|
||||||
this.actor._arrowRotation = this._arrow.rotation_angle_z;
|
this.actor._arrowRotation = this._arrow.rotation_angle_z;
|
||||||
Tweener.addTween(this.actor,
|
Tweener.addTween(this.actor,
|
||||||
{ _arrowRotation: 90,
|
{ _arrowRotation: this.actor._arrowRotation + 90,
|
||||||
height: naturalHeight,
|
height: naturalHeight,
|
||||||
time: 0.25,
|
time: 0.25,
|
||||||
onUpdateScope: this,
|
onUpdateScope: this,
|
||||||
@ -887,7 +887,7 @@ const PopupSubMenu = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this._arrow.rotation_angle_z = 90;
|
this._arrow.rotation_angle_z = this.actor._arrowRotation + 90;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -907,7 +907,7 @@ const PopupSubMenu = new Lang.Class({
|
|||||||
if (animate) {
|
if (animate) {
|
||||||
this.actor._arrowRotation = this._arrow.rotation_angle_z;
|
this.actor._arrowRotation = this._arrow.rotation_angle_z;
|
||||||
Tweener.addTween(this.actor,
|
Tweener.addTween(this.actor,
|
||||||
{ _arrowRotation: 0,
|
{ _arrowRotation: this.actor._arrowRotation - 90,
|
||||||
height: 0,
|
height: 0,
|
||||||
time: 0.25,
|
time: 0.25,
|
||||||
onUpdateScope: this,
|
onUpdateScope: this,
|
||||||
@ -921,7 +921,7 @@ const PopupSubMenu = new Lang.Class({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this._arrow.rotation_angle_z = 0;
|
this._arrow.rotation_angle_z = this.actor._arrowRotation - 90;
|
||||||
this.actor.hide();
|
this.actor.hide();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user