Skip to content

eeglab main window: text squeezed in the startup state, use the full width as in EEGLAB #699

Done

Description

@arnodelorme

Arno commented the File menu report of #696 (EEGPrep versus EEGLAB, side-by-side captures) on November 26, 2026; this issue is one of his comments, with one pull request to address it.

Arno's comment, in his words

On the Python side, the text is too compressed. It doesn't take the entire window like the MATLAB side.

From his annotated copy of the report: https://github.com/adelorme-assistant/project_eegprep/blob/main/reports/file-menu-2026-11-26/EEGPrep_vs_EEGLAB_File_menu_2026-11-26_Arno-comments.docx

How to test

The windows are opened on jamming (MATLAB R2025b and EEGPrep under Xvfb, /mnt/v1/arno/menutest_probe shows how), never on Arno's Mac in the daytime. Capture EEGLAB's window, EEGPrep's before and EEGPrep's after; put the three side by side. Run the tests of the functions touched (pytest) before opening the pull request.

Activity

  1. added
    gui-parity
    on Nov 26, 2026
  2. claude commented on Nov 26, 2026

    @claude
    Contributor

    🤖 Plan:

    • Read issue, check for duplicate work (none open)
    • Locate the layout code
    • Implement + capture: blocked here, needs a human or an agent on jamming (see below)

    Research

    The main window content is built from fixed-size Qt labels stacked at the top of the frame. Every label uses a fixed 13 px Courier font, the startup lines are packed with zero spacing, and addStretch(1) pushes all spare height below the text. The QGridLayout data panel works the same way. EEGLAB places its rows with normalized uicontrol positions spread over the whole figure, so its text fills the frame in both directions and grows with the window. EEGPrep's text stays the same size in the upper-left part of the 520×380 window.

    Relevant code

    Proposed Fix

    1. Drop the addStretch(1) and give each startup row and each data-grid row equal stretch, so the lines spread evenly over the frame height like EEGLAB's normalized rows.
    2. Scale the label font in a resizeEvent of the central widget: pick the largest pixel size where the longest startup line (or the widest name/value pair) fits the frame's inner width, with 13 px as the floor. Text then fills the width at 520×380 and still fills it after a resize.
    3. Re-check the 30/14 px frame margins against EEGLAB's BORDEREXT/BORDERINT values in eeglab.m.

    This is roughly 30–50 changed lines in main_window.py, plus a test asserting that the longest startup line takes up at least about 90% of the stack width at the default size.

    Why there is no PR: the definition of done needs EEGLAB/before/after captures from jamming (MATLAB R2025b + Xvfb) and a Word + PDF report. This CI runner has no MATLAB, the vendored src/eegprep/eeglab/ checkout is empty, and outbound fetches of eeglab.m are blocked, so I can't take the EEGLAB reference values (font size, borders, row spacing) or produce the captures. Run the main_window, main_window_continuous and main_window_epoched cases in tools/visual_parity/cases.json on jamming to tune steps 1–3.

  3. arnodelorme commented on Nov 26, 2026

    @arnodelorme
    CollaboratorAuthor

    Pull request: #721 ([GUI] Spread the main window startup text over the frame). The startup lines now share the frame height as in EEGLAB (two lines of code). The continuous and epoched states already filled the frame and are identical before and after. The font was not changed. Captures of the three states and tests (65 passed): https://github.com/adelorme-assistant/project_eegprep/blob/main/reports/pr-699/issue-699_before_after.pdf (Word file next to it). Arno merges.

  4. changed the title [-]Main window: text squeezed in the startup state, use the full width as in EEGLAB[/-] [+]eeglab main window: text squeezed in the startup state, use the full width as in EEGLAB[/+] on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    gui-parity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions