Repository navigation
[GUI] Size a dialog from its rows, one row height per platform, never shorter than its content - #776
Conversation
The fixed 480 pixel height spread the 13 rows over too much space. A dialog with no fixed height no longer shares height among its rows. Fixes #775 Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
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 finished @claude[bot]'s task in 59s —— View job Code review
BlockingNone. ImportantNone. Nits
Test gapsNone. The new assertions cover both claims in the description: the window fits its content, and the blank row after Dataset name is kept ( EEGLAB parity notesNone. GUI-only layout change. Labels, defaults and control order are unchanged, and the window no longer spreads rows over spare height, which brings it closer to EEGLAB's packed I checked correctness of the size and stretch paths in |
|
🤖 Captures: review: the change is the one of issue #775 and it is right. It gives the same picture as my own version (1150 by 389 on jamming, 385 with the Mac style, EEGLAB's is 450). One commit added (a70cb7d): the changelog entry moved a few lines down, because it conflicted with the entry of #773. The two now merge in any order, and both carry the same one line of qt.py. The check Ruff and ty fails because of develop itself (merge #766 first). |
|
🤖 Captures: new height after Arno's answer of November 27 ("Before too much space between the rows. After it doesn't have enough. Something in the middle would be great for Mac."). The window is now 1150 by 430 pixels, between the 480 of develop and the 385 of the first version. The rows share that height again, so this pull request no longer touches the shared code (only the size, the test and the changelog), and develop is merged in. The Mac pictures are real windows shown on the Mac for a second and grabbed by Qt (native macOS style, no title bar: a screen capture needs a permission I do not answer). The jamming pictures are taken under Xvfb. |
|
🤖 About the failing test jobs here: the one test that fails, |
A window without a height takes the platform row height, raised to its tallest one-line control plus the gap, through a layout strut so a larger font grows the row and the window. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🤖 Handoff for the November 28 GUI work. My EEGPrep code change is 5a14380 on For anyone working on shared dialog sizing in #776, the regression test to check is Current work is the comparison report for Tools, Plot, Study, Datasets and Help. The Linux PDF and Word report have been sent. Results for rejection by inspection, rereferencing and epoch extraction are on #793, #794 and #795. Native macOS and Windows captures are scheduled for November 29 at 12:05 a.m. Pacific. I am documenting differences in these menus for Arno’s review. |




A window whose specification gives no height is now as high as its rows, as in EEGLAB's
supergui: every row, blank rows included, takes the same height. That height is a constant per platform kept in one place (28 pixels), raised in each window to its tallest one-line control plus the gap, so no row is ever shorter than its content.pop_importdatano longer has a height of its own. On Linux 13 of the 127 dialog renderings change size, the other 114 are identical pixel for pixel.Graphics
On Linux (jamming): EEGLAB, EEGPrep before, EEGPrep after.
With the Mac style (drawn without opening a window, today): develop at 480 pixels, after at 454 pixels: 13 rows of 30 pixels (edit box 26 plus a gap of 4). The real Mac window comes tonight.
Numerical difference with EEGLAB
All 10 test cases give exactly EEGLAB's result: the data (distance 0), the sampling rate, the numbers of channels, points and epochs, the start and end times, the channel labels and coordinates, and the dataset fields. No case fails. This pull request changes the window only, so these numbers are those of develop.
The numbers: EEGLAB's rule and the row height per platform
supergui.m, lines 334 to 437): the height of a figure is its number of rows times one row height, plus 1.1 rows of borders. The row height is the height of a line of text times a platform factor: 1 on Linux, 1.5 on the Mac, 1.08 on Windows.inputgui.madds one blank row and the row of buttons.pop_importdataon Linux: 15 rows, 450 pixels, so 27.8 pixels per row.EEGLAB_ROW_HEIGHTinguifunc/theme.py, the smallest row per platform: Linux 28, Mac 28, Windows 28 (EEGLAB's own row). Each window raises it to its tallest edit box or popup menu plus the 4 pixel gap: 31 pixels on Linux (edit box 27), 30 with the Mac style (edit box 26). Since develop's commit 9ada0ae the edit boxes are as tall as their text needs, which is why the row is above 28.pop_importdata: 13 rows of 31 pixels plus the margins and the buttons, 471 pixels on Linux, 454 with the Mac style (EEGLAB on Linux: 450 for 15 rows). A larger font makes the rows and the window taller.Every dialog that moves on Linux, before and after (13 of 127)
What the code changes, and the tests
guifunc/theme.py: the tableEEGLAB_ROW_HEIGHT.guifunc/qt.py:_row_height(the platform minimum, raised to the tallest one-line control of the window plus the gap) and_content_row_height(geomverttimes that height, 1 by default). Each row gets it as a layout strut, so it is at least one row high and a taller control, such as a list box or a larger font, makes the row and the window taller. A blank row takes a full row.popfunc/pop_importdata.py:size=(1150, None).test_disabled_list_box_is_greyed, fixed by [GUI] Parse the dialog style sheet afresh so a dialog never inherits another one's #778, and tests that need packages jamming lacks).How the numbers were obtained
eeglab_data.fdt,eeglab_data_epochs_ica.fdtandeeglab_data_epochs_ica.set.notes/file-menu-row-height-2026-11-27/scriptsof adelorme-assistant/project_eegprep (numeric_ref.m,numeric_py.py,histogram.py).Fixes #775
Part of #737 and #745