Skip to content

[GUI] Name the real cause of the row height fix - #862

Merged
arnodelorme merged 2 commits into
developfrom
agent/20261128-row-height-cause
Nov 29, 2026
Merged

arnodelorme merged 2 commits into
developfrom
agent/20261128-row-height-cause

Conversation

@arnodelorme

Copy link
Copy Markdown
Collaborator

Follow-up to #835: the code comment and the changelog named the wrong cause. No behaviour changes, only text.

EEGPrep on Windows before #835 (c6f4804) after #835 (382ec3c)
before after

No distance histogram: nothing numerical changes.

Details

🤖 Generated with Claude Code

The edit box of #835 was one pixel taller only with a font whose
leading exceeds two pixels: Qt's fallback box font on the font-less
Windows CI job. Segoe UI has no leading, and the Windows capture is
the same before and after #835.

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

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

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 29, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @arnodelorme's task in 35s —— View job


PR review: #862, which corrects the stated cause of the row height fix

  • Read AGENTS.md and the review playbook
  • Read the diff against origin/develop (2 files, comment and changelog text only)
  • Checked the technical claims in the new text against how Qt sizes a QLineEdit
  • Posted the review

Verdict: no blocking or important issues. The PR changes only text. _row_height behaves exactly as before, so it needs no tests, no EEGLAB reference run and no parity evidence.

Checks on the claims

  • The "leading exceeds two pixels" threshold matches Qt's sizing code, as far as I recall it. I did not open the Qt source in this job. In Qt 6 qlineedit.cpp:
    • sizeHint() adds 2 * verticalMargin to the font height. verticalMargin is 1, so that adds 2 pixels.
    • minimumSizeHint() adds qMax(2 * verticalMargin, fm.leading()) instead.
    • So the minimum hint is taller only when the leading is above 2. A leading of 3 makes it 1 pixel taller, which gives the 25 vs 24 numbers in the description.
  • The comment explains a non-obvious layout effect. It says why the code takes expandedTo(minimumSizeHint()). It does not repeat the code or excuse a workaround, so it fits the AGENTS.md comment rules.
  • The changelog entry now covers every platform. It names the font condition instead of "On Windows", and it says that Windows with its usual fonts is unchanged. That is accurate, given the byte-identical Windows captures before and after [GUI] Measure the dialog row height as the layout sizes an edit box #835.

Nits (optional)

  1. The comment ties itself to CI (src/eegprep/functions/guifunc/qt.py:962-964). "as on the Windows CI job" will go stale if CI moves off offscreen or adds QT_QPA_FONTDIR, which the separate issue may well do. Something like "…when a Qt platform plugin finds no system fonts (e.g. offscreen on Windows)" stays true and keeps the useful hint.
  2. The changelog wording is technical (docs/source/changelog.rst:13). "Leading" will mean little to most EEG researchers. Since no real Windows desktop changes, a plainer entry would do, for example: "Dialog rows no longer grow one pixel taller than their edit boxes when Qt falls back to its built-in font. Normal desktops, including Windows, look the same." Optional, because the current text is correct.

Out of scope here: the CI point from the PR body. The Windows CI job does not test real Windows layouts, because offscreen Qt on Windows uses no system fonts. The separate issue the body mentions is the right place for that.

@arnodelorme
arnodelorme merged commit 83bf988 into develop Nov 29, 2026
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.

1 participant