Skip to content

[GUI] Lay out checkboxes and radio buttons by their widget rect - #774

Merged
arnodelorme merged 3 commits into
developfrom
agent/20261127-fix-772
Nov 27, 2026
Merged

arnodelorme merged 3 commits into
developfrom
agent/20261127-fix-772

Conversation

@claude

@claude claude Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Set Qt.WA_LayoutUsesWidgetRect on supergui checkboxes and radio buttons so the macOS style no longer makes checkbox rows taller than edit rows or starts the box 2 pixels left. Linux and Fusion rendering are unchanged, so no automated test can observe this; the evidence is the macOS before and after capture in #745.

Fixes #772
Part of #745

🤖 Generated with Claude Code

The macOS style reserves a larger layout rect for checkboxes and radio
buttons, making checkbox rows taller than edit rows and shifting the box
2 px left. Fusion/Linux rendering is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.

Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.

@claude

claude Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Claude finished @claude[bot]'s task in 34s —— View job


Code review

  • Pre-review gate: PR is open, not a draft, has no earlier review, and the checked-out commit matches the PR head 6853edb

  • Read AGENTS.md / CLAUDE.md

  • Reviewed the diff and the code around it in src/eegprep/functions/guifunc/qt.py

  • Ran the four review passes and checked each finding

  • Overall assessment: Looks good. I found no problems in this two-line change.

  • Highest-risk area: None found. The change only affects how supergui places checkbox and radio button rows.

  • Merge recommendation: Safe to merge.

Blocking

None.

Important

None.

Nits

None.

Test gaps

None. The PR says no automated test can see this change, and that holds. CI draws dialogs with the Fusion style, and WA_LayoutUsesWidgetRect makes no difference there. The macOS before and after captures in #745 are the right evidence.

EEGLAB parity notes

None. The change makes macOS checkbox and radio rows the same height as edit rows, and lines the box up with the column. That is closer to EEGLAB's supergui grid, so it helps parity.

What I checked:

  • The setting reaches the layout. supergui rows are built with Qt layouts (row_layout.addWidget, qt.py:242-253), not fixed positions, so WA_LayoutUsesWidgetRect changes where these widgets go.
  • The name works. QtCore is the module-level PySide6 import (qt.py:63). PySide6 accepts the short name QtCore.Qt.WA_LayoutUsesWidgetRect, and the rest of qt.py uses short Qt names too.
  • It matches the issue. Both checkboxes and radio buttons are covered, as supergui: on the Mac a checkbox row is taller than an edit row and the box starts 2 pixels left #772 asks.
  • Repo rules. The new comment explains why the setting is needed rather than restating the code, which AGENTS.md allows. The change is as small as it can be and touches nothing else.

Checked for correctness bugs, EEGLAB parity, data structure compatibility, tests for the changed behaviour, and CLAUDE.md/AGENTS.md compliance.

@arnodelorme

Copy link
Copy Markdown
Collaborator

🤖 Captures: review: the change is the one of issue #772 and it is right. No commit added. Measured on all 127 dialog renderings: on Linux (jamming) nothing changes, with the native Mac style 31 dialogs change by a few pixels and four change size (pop_export 317 to 300 pixels high, pop_chanevent, pop_loadcnt 168 to 161, tf_cycle_calc 617 to 619 wide). This branch gives the same pictures as my own version, except one dialog whose text holds a temporary folder name. The Mac pictures were grabbed without showing a window. The check Ruff and ty fails because of develop itself (merge #766 first).

pop_export with the Mac style, before and after: even rows, boxes on the edit column

pop_export with the Mac style, before and after: even rows, boxes on the edit column

pop_chanevent with the Mac style: develop, and with this pull request and #773 together

pop_chanevent with the Mac style: develop, and with this pull request and #773 together

pop_reref with the Mac style, before and after: checkboxes with a text move 2 pixels

pop_reref with the Mac style, before and after: checkboxes with a text move 2 pixels

@arnodelorme
arnodelorme merged commit 395f19e into develop Nov 27, 2026
9 of 12 checks passed
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.

supergui: on the Mac a checkbox row is taller than an edit row and the box starts 2 pixels left

1 participant