[gnome-shell] pointerA11yTimeout: Draw a clean circle if the pie is finished



commit 20fc4b4490c72076fb8e0360bf44678c08bb2d80
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Thu Aug 22 10:05:40 2019 +0200

    pointerA11yTimeout: Draw a clean circle if the pie is finished
    
    If the circle is complete and the pie timeout finished, we don't need
    the lines to the center point indicating the ends of the pie anymore.
    We just draw a clean circle instead, which allows for a zoom-out and
    fade animation of the circle when we're done.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/688

 js/ui/pointerA11yTimeout.js | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/pointerA11yTimeout.js b/js/ui/pointerA11yTimeout.js
index 5744ac300d..d285ccf2ad 100644
--- a/js/ui/pointerA11yTimeout.js
+++ b/js/ui/pointerA11yTimeout.js
@@ -50,9 +50,14 @@ var PieTimer = GObject.registerClass({
         cr.setLineJoin(Cairo.LineJoin.ROUND);
         cr.translate(width / 2, height / 2);
 
-        cr.moveTo(0, 0);
+        if (this._angle < 2 * Math.PI)
+            cr.moveTo(0, 0);
+
         cr.arc(0, 0, radius - borderWidth, startAngle, endAngle);
-        cr.lineTo(0, 0);
+
+        if (this._angle < 2 * Math.PI)
+            cr.lineTo(0, 0);
+
         cr.closePath();
 
         cr.setLineWidth(0);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]