tools/debug-gui: color the fingers with different colors

Follow-up to commit 713892c162 ("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>
This commit is contained in:
Peter Hutterer 2024-12-19 13:51:42 +10:00 committed by Marge Bot
parent 4131e4d2c0
commit 2e9d8df74e

View 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;