[iagno] Improve highlights delay.



commit b8abd8864994c68da7f90f64abac36d0036770b2
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Mon Dec 9 18:36:54 2019 +0100

    Improve highlights delay.

 src/reversi-view.vala | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/reversi-view.vala b/src/reversi-view.vala
index a302c2c..702a1f0 100644
--- a/src/reversi-view.vala
+++ b/src/reversi-view.vala
@@ -1299,7 +1299,11 @@ private class ReversiView : Gtk.DrawingArea
                         Source.remove (timeout_id);
                         timeout_id = 0;
                     }
-                    timeout_id = Timeout.add (show_playable_tiles ? 50 : 200, () => {
+                    uint delay;
+                    if (show_turnable_tiles)        delay = 120;
+                    else if (show_playable_tiles)   delay =  50;
+                    else                            delay = 200;
+                    timeout_id = Timeout.add (delay, () => {
                             if (mouse_is_in)
                                 _on_motion (x, y, /* force redraw */ false);
                             timeout_id = 0;


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