fix(ui): checkbox checkmarks on high-DPI displays (#24) #30

Merged
ValleyGeek merged 4 commits from 0.1.1/issue-24-checkbox-checkmarks into main 2026-06-09 05:52:54 +00:00
Member

Summary

Fixes #24 — checkbox state toggled correctly but the checked indicator was invisible on standard and high-DPI displays.

Root cause

Checkbox checkmarks were rendered via QCheckBox::indicator:checked { image: url(...) } in the application stylesheet, using a fixed 15×15 PNG. Qt does not reliably load or scale those indicator images at device pixel ratios above 1.0.

Solution

  • Replace QSS indicator images with ThemedProxyStyle, which paints checkbox indicators via QPainter using theme colors.
  • Install the proxy before QApplication.setStyleSheet() so checkbox drawing stays on the proxy while panel/splitter rules remain in QSS.
  • Add regression test that verifies checkmark-colored pixels in the indicator grab (passes at 1× and 2× DPI).

Version

Bumps VERSION to 0.1.2.

Verification

  • ruff check . && ruff format --check .
  • pytest (218 passed, 1 skipped)
  • ./scripts/smoke-ui-exit.sh
  • Manual confirmation from reporter on issue #24

Threading notes

No worker or threading changes; UI style/paint path only on the main thread.

## Summary Fixes #24 — checkbox state toggled correctly but the checked indicator was invisible on standard and high-DPI displays. ## Root cause Checkbox checkmarks were rendered via `QCheckBox::indicator:checked { image: url(...) }` in the application stylesheet, using a fixed 15×15 PNG. Qt does not reliably load or scale those indicator images at device pixel ratios above 1.0. ## Solution - Replace QSS indicator images with `ThemedProxyStyle`, which paints checkbox indicators via `QPainter` using theme colors. - Install the proxy **before** `QApplication.setStyleSheet()` so checkbox drawing stays on the proxy while panel/splitter rules remain in QSS. - Add regression test that verifies checkmark-colored pixels in the indicator grab (passes at 1× and 2× DPI). ## Version Bumps `VERSION` to **0.1.2**. ## Verification - `ruff check . && ruff format --check .` - `pytest` (218 passed, 1 skipped) - `./scripts/smoke-ui-exit.sh` - Manual confirmation from reporter on issue #24 ## Threading notes No worker or threading changes; UI style/paint path only on the main thread.
fix(ui): render checkbox checkmarks at any DPI via proxy style
Some checks failed
CI / test (pull_request) Has been cancelled
CI / nuitka-smoke (pull_request) Has been cancelled
CI / lint (pull_request) Has been cancelled
4c5d100ca9
QSS indicator images fail on high-DPI displays, leaving checked boxes
empty while state still toggles. Replace cached PNG QSS indicators with
ThemedProxyStyle vector painting installed before the application
stylesheet so checkbox drawing stays reliable on Linux and Windows.

version: bump to 0.1.2
docs: record 0.1.2 checkbox indicator fix in changelog
Some checks failed
CI / lint (pull_request) Successful in 6s
CI / test (pull_request) Failing after 1m2s
CI / nuitka-smoke (pull_request) Has been cancelled
85ca443802
test: align version assertions with 0.1.2 bump
Some checks failed
CI / lint (pull_request) Successful in 6s
CI / test (pull_request) Successful in 1m1s
CI / nuitka-smoke (pull_request) Has been cancelled
35a9adf7f2
test: derive version assertions from VERSION file
All checks were successful
CI / lint (pull_request) Successful in 6s
CI / test (pull_request) Successful in 59s
CI / nuitka-smoke (pull_request) Successful in 11m22s
185ad26454
Replace hardcoded 0.1.2 literals with repo_version() helper and
relationship checks against canonical_version(), so version tests stay
valid across bumps without manual updates.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ai-collab/bulk-image-organizer!30
No description provided.