Skip to content

fix(gui): give paired checkboxes the gap every other pair already had - #144

Merged
donislawdev merged 1 commit into
masterfrom
fix/space-between-paired-checkboxes
Aug 20, 2026
Merged

fix(gui): give paired checkboxes the gap every other pair already had#144
donislawdev merged 1 commit into
masterfrom
fix/space-between-paired-checkboxes

Conversation

@donislawdev

Copy link
Copy Markdown
Owner

Reported from the running build the day after the two LAN switches landed side by side:
"Internet only" started exactly where the "LAN mode" label ended, with nothing between them, so the
pair read as one control rather than two.

Why it happened

The BOOL branch of form._place_one packs its Checkbutton straight into the row:

widget.pack(side="left", anchor="w")        # no padx at all

Every other kind goes through a cell that carries padx=(0, scaled(22)). That difference had no
visible consequence for as long as no two checkboxes ever shared a row - a state that lasted exactly
one day, since the registry only learned to pair them yesterday.

The fix

Both paths ask _gap_after(field) now, so the two cannot drift apart again: a field that owns its
row only has to clear the card's edge, two that share one get a real gap. One rule, one constant, in
the place that already decides whether a field takes a row to itself.

Measured

On real Tk at 1366x768, in both languages:

gap lan_mode internet_only spare to the right
English 22 px asks 254, gets 254 asks 191, gets 191 59 px
Polish 22 px asks 249, gets 249 asks 195, gets 195 63 px

22 px is the same gap any other pair of fields in a row gets. Nothing is clipped, and the row still
has room to spare at the minimum supported resolution.

Guard

The test that already asserts the two share a row now also asserts they do not touch, and a
MUTATIONS entry reddens it by putting the padding-free pack call back. The render check
(buttons and checkboxes since yesterday) passes in both languages, and the fix was looked at on the
live window as well, since "they touch" is a question about pixels.

Reported from the running build the day after the two LAN switches landed side
by side: "Internet only" started exactly where the "LAN mode" label ended, so
the pair read as one control rather than two.

The BOOL branch of the form packs its Checkbutton straight into the row with no
padding at all, while every other kind goes through a cell carrying
padx=(0, scaled(22)). That difference was invisible for as long as no two
checkboxes ever shared a row, which is a state that existed for one day.

Both paths ask _gap_after(field) now, so the two cannot drift apart again: a
field that owns its row only has to clear the card edge, two that share one get
a real gap.

Measured on real Tk at 1366x768: 22 px between them in both languages, the same
as any other pair of fields, with neither label clipped and 59-63 px still spare
to the right of the second one.

Guard: the gap assertion added to the test that already checks the two share a
row, plus a MUTATIONS entry that reddens it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@donislawdev
donislawdev merged commit 62722c2 into master Aug 20, 2026
13 of 14 checks passed
@donislawdev
donislawdev deleted the fix/space-between-paired-checkboxes branch August 20, 2026 17:40
donislawdev added a commit that referenced this pull request Aug 20, 2026
Four pull requests landed after v0.5.0-rc.2 was cut (#141 to #144), one of them
a new user-visible switch, and every note they carried had collected under
[Unreleased]. Closing the version means moving them into the dated section, so
the tag ships what the release actually contains rather than what the rc did.
The tag check cannot catch this on its own: an rc and its release share a
version by design, so v0.5.0-rc.2 and v0.5.0 both match 0.5.0.

CHANGELOG.md: the moved entries join the Added, Changed and Fixed blocks that
[0.5.0] already has, rather than opening a second set of headings the
duplicate-heading guard would reject. The Added ones lead their block, because
the new switch is the largest user-visible change in the section, and the
summary gains a third paragraph naming it - including the one thing worth
knowing before ticking it, that the router lives on the local network too.

The section carries the release day, not the day the rc closed it.

The internal changelog is closed the same way, except its block goes in whole
with its own headings: those headings carry content and repeat by design. It is
not tracked here, so this commit cannot show that half.

[Unreleased] stays as a bare heading, which is the shape the release workflow
checks for at tag time.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant