From e587a111dc41a5e1cefa706cbfebea6003b04a49 Mon Sep 17 00:00:00 2001 From: Arda Aydin Date: Fri, 4 Sep 2026 19:14:17 +0300 Subject: [PATCH] Wiresheet: keep the half-and-half knob's white centre centred Pushed into the wire-coloured half, the centre filled almost all of it: that half is only KNOB_RADIUS wide and the centre is KNOB_CORE_RADIUS, so at the real 8px knob size the wire colour was reduced to a sliver and the marker read as plain grey. Centred, both halves keep enough colour to tell apart. Found on a slot carrying two links on its own sheet plus one leaving it, which is the only arrangement that produces this knob and did not occur in testSax until now. Co-Authored-By: Claude Opus 5 --- wiresheet.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wiresheet.py b/wiresheet.py index c2b7676..aa1aa17 100644 --- a/wiresheet.py +++ b/wiresheet.py @@ -575,13 +575,13 @@ def draw_knob(x, y, on_sheet, off_sheet, extra_tags=()): outline="white", width=1, tags=tags) if on_sheet: - # A small white centre is what marks the far end as being on this sheet. It - # keeps its colour through selection, so the middle never fills in -- and on a - # half-and-half knob it sits in the wire-coloured half it belongs to. - cx = x - KNOB_RADIUS / 2 if off_sheet else x + # A small white centre is what marks the far end as being on this sheet. It keeps + # its colour through selection, so the middle never fills in. It stays centred + # even on a half-and-half knob: pushed into the wire-coloured half it would fill + # that half almost completely and leave no colour to read. canvas.create_oval( - cx - KNOB_CORE_RADIUS, y - KNOB_CORE_RADIUS, - cx + KNOB_CORE_RADIUS, y + KNOB_CORE_RADIUS, + x - KNOB_CORE_RADIUS, y - KNOB_CORE_RADIUS, + x + KNOB_CORE_RADIUS, y + KNOB_CORE_RADIUS, fill="white", outline="", tags=tags + ("link_knob_core",) )