pointerA11yTimeout: Fade the pie timer in

Fade the pie timer in using a duration of 1/4 of the timeout and a
EASE_IN_QUAD animation. This significantly reduces flickering of the pie
timer while moving the cursor and makes the timer less distracting.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/688
This commit is contained in:
Jonas Dreßler 2019-08-22 10:02:42 +02:00 committed by Olivier Fourdan
parent 67a0b3b98e
commit 2c4df6abcf

View File

@ -69,6 +69,7 @@ var PieTimer = GObject.registerClass({
start(x, y, duration) { start(x, y, duration) {
this.remove_all_transitions(); this.remove_all_transitions();
this.opacity = 0;
this.x = x - this.width / 2; this.x = x - this.width / 2;
this.y = y - this.height / 2; this.y = y - this.height / 2;
this._angle = 0; this._angle = 0;
@ -76,6 +77,12 @@ var PieTimer = GObject.registerClass({
this.show(); this.show();
Main.uiGroup.set_child_above_sibling(this, null); Main.uiGroup.set_child_above_sibling(this, null);
this.ease({
opacity: 255,
duration: duration / 4,
mode: Clutter.AnimationMode.EASE_IN_QUAD
});
this.ease_property('angle', 2 * Math.PI, { this.ease_property('angle', 2 * Math.PI, {
duration, duration,
mode: Clutter.AnimationMode.LINEAR, mode: Clutter.AnimationMode.LINEAR,