tools/debug-gui: color the fingers with different colors
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 19 Dec 2024 03:51:42 +0000 (13:51 +1000)
committerMarge Bot <emma+marge@anholt.net>
Fri, 20 Dec 2024 01:15:11 +0000 (01:15 +0000)
Follow-up to commit 713892c162f0 ("Number the fingers by slot in debug-gui")
this changes the colors slightly for each finger, making it easier to
track visually.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1103>

tools/libinput-debug-gui.c

index 83149b90a920bc33e7b6a63d99e87450860439d1..858093baff0643e431f5b58a23eaacf3d38ad527 100644 (file)
@@ -499,7 +499,10 @@ draw_evdev_abs(struct window *w, cairo_t *cr)
                if (!w->evdev.slots[i].active)
                        continue;
 
-               cairo_set_source_rgb(cr, .2, .2, .8);
+               cairo_set_source_rgb(cr,
+                                    .2 + .2 * (i % 5),
+                                    .2 + .2 * (i % 5),
+                                    .8 - .2 * (i % 5));
                x = w->evdev.slots[i].x;
                y = w->evdev.slots[i].y;
                x = 1.0 * (x - ax->minimum)/width * outline_width;