Public repository: timo / schach

Reader

Ein aufgeräumtes Schach-Programm für GNOME

style(board): hover arrow as slim as the crosshair

public

style(board): hover arrow as slim as the crosshair

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Changeset6e7d3a949184be8eff2db3158f88558a6cb6fd0a
Author (claimed)Timo Stolz <timo.stolz@nullachtvierzehn.de>,
Parentsfb734551cbe2
Childrenc02631b5642e
Pushlog
by timo via ssh
by timo via ssh

modified schach/diagram.py +4 −3

@@ -376,18 +376,19 @@ class BoardPainter:
376376
         x1, y1 = self._square_origin(dst)
377377
         x0, y0, x1, y1 = x0 + sq / 2, y0 + sq / 2, x1 + sq / 2, y1 + sq / 2
378378
         angle = math.atan2(y1 - y0, x1 - x0)
379
-        head = sq * 0.38
379
+        # mit Rand so schlank wie das Visier (Linie 0,07, Rand 0,02), sonst wie bei Lichess
380
+        shaft, head = (sq * 0.07, sq * 0.28) if outline else (sq * 0.13, sq * 0.38)
380381
         tip_x, tip_y = x1 - math.cos(angle) * sq * 0.12, y1 - math.sin(angle) * sq * 0.12
381382
         base_x, base_y = tip_x - math.cos(angle) * head * 0.8, tip_y - math.sin(angle) * head * 0.8
382383
         start_x, start_y = x0 + math.cos(angle) * sq * 0.2, y0 + math.sin(angle) * sq * 0.2
383
-        passes = [((0, 0, 0, 0.45), sq * 0.04), ((*rgb, 1.0), 0)] if outline else [((*rgb, 0.8), 0)]
384
+        passes = [((0, 0, 0, 0.35), sq * 0.02), ((*rgb, 1.0), 0)] if outline else [((*rgb, 0.8), 0)]
384385
         cr.save()
385386
         cr.set_line_cap(cairo.LINE_CAP_ROUND)
386387
         cr.set_line_join(cairo.LINE_JOIN_ROUND)
387388
         for color, grow in passes:
388389
             cr.set_source_rgba(*color)
389390
             cr.new_path()
390
-            cr.set_line_width(sq * 0.13 + 2 * grow)
391
+            cr.set_line_width(shaft + 2 * grow)
391392
             cr.move_to(start_x, start_y)
392393
             cr.line_to(base_x, base_y)
393394
             cr.stroke()