Skip to content

fix: keep toggle switches clear of the settings scrollbar - #56

Merged
DavidHruby1 merged 3 commits into
mainfrom
fix/toggle-switch-edge-pad
Nov 4, 2026
Merged

DavidHruby1 merged 3 commits into
mainfrom
fix/toggle-switch-edge-pad

Conversation

@DavidHruby1

Copy link
Copy Markdown
Owner

Closes #51

Changes

  • ToggleSwitch: new _EDGE_PAD = 4 right inset; track moved to rect.right() - _EDGE_PAD - _TRACK_W, text rect shrunk by the same amount, sizeHint() widened by _EDGE_PAD. Focus ring offset named _FOCUS_RING; track geometry in _track_rect().
  • Page margins and hitButton unchanged (whole row still clickable).
  • Tests: ToggleSwitchEdgeTests (size hint includes padding, track + focus ring + pen inside rect(), row clickable).
  • docs/PRODUCT-REVIEW-2026-10.md: item 5 marked fixed in code, pending manual Windows check.

Verification

  • python -m unittest discover -s tests — OK
  • python -m compileall src/ — OK
  • Manual on Windows still pending: page with/without scrollbar, DPI 100/125/150/200 %, on/off, keyboard focus, disabled.

🤖 Generated with Claude Code

DavidHruby1 and others added 3 commits November 4, 2026 09:54
ToggleSwitch drew its track 1 px from the right edge, so the focus ring
and antialiased edge were clipped against the scrollbar. Inset the track
by _EDGE_PAD (4 px), shrink the text rect accordingly and reserve the
padding in sizeHint.

Closes #51

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DavidHruby1 DavidHruby1 closed this Nov 4, 2026
@DavidHruby1 DavidHruby1 reopened this Nov 4, 2026
@DavidHruby1
DavidHruby1 merged commit d7b5283 into main Nov 4, 2026
@DavidHruby1
DavidHruby1 deleted the fix/toggle-switch-edge-pad branch November 4, 2026 11:11
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.

fix: přepínače v nastavení oříznuté scrollbarem

1 participant