You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pop_comments (Edit > About this dataset): match the resizable EEGLAB figure and its editor #925
The Edit > About this dataset window opens at 1394 × 456 px in EEGPrep on jamming. EEGLAB opens its figure at 1394 × 840 px. The editor, caption and buttons also move differently when the window is resized.
Reference and verification
Additional finding from #727, pop_comments (Edit > About this dataset): graphical and numerical parity with EEGLAB. Part of #875. Compare the native figure at opening and at 950 × 620 px, including the axes title, the font and wrapping of the sample comments, SAVE, CANCEL, and the returned text.
🤖 PR #929, stacked on #908, now includes native MATLAB and Qt captures on jamming for two figure sizes. The editor and button rectangles matched within 0.5 px at both sizes. SAVE and CANCEL returned matching comment text. The focused suite passed 47 tests.
No PR: this needs a renderer layout change and an EEGLAB capture on jamming to check it, so it is more than a small fix. Waiting for a human decision on the approach and on the open questions
Research
EEGLAB does not use inputgui here. pop_comments.m#L91-L135 opens a plain figure (default size) and places the axes title, the edit box and both buttons in Normalized units, relative to the default axes pos = [.13 .11 .775 .815]. So every element, buttons included, scales with the window. EEGPrep renders an inputgui spec with fixed pixel margins (170/35/170/50), 18 px spacing and fixed 150×45 buttons. The 456 px height has a separate cause: when the dialog has a QTextEdit, _apply_spec_size sizes it to the text and skips the spec.size height floor.
EEGLAB geometry as figure fractions, with s = pos(3:4)/100 and q = pos(1:2):
element
x
y (from bottom)
w
h
px at 1394×840
edit [0 10 105 85]
0.130
0.192
0.814
0.693
1134×582
CANCEL [0 -5 20 10]
0.130
0.069
0.155
0.082
216×68
SAVE [80 -5 20 10]
0.750
0.069
0.155
0.082
216×68
title
top of axes, y ≈ 0.925
Opening size (smallest fix, about 5 lines): in _apply_spec_size, apply the spec.size[1] floor to editor dialogs too. pop_comments is the only textarea user, so no other window changes. This fixes the 1394 × 456 part only.
Resize behavior: give pop_comments a small QDialog, or a normalized_geometry option on DialogSpec, whose resizeEvent sets each child's geometry from the fractions above, so the title, editor and buttons scale as in MATLAB. The inputgui row layout cannot do this because its margins and buttons are in pixels. I suggest a dedicated helper in guifunc used only by pop_comments. Estimate: about 80–120 lines plus a Qt test that resizes to 950×620 and checks the button and editor rectangles against the fractions.
Add a tools/visual_parity case at opening and at 950×620 and capture it against EEGLAB on jamming (eeglab-gui-visual-parity skill).
Activity
arnodelorme commentedon Dec 1, 2026
🤖 PR #929, stacked on #908, now includes native MATLAB and Qt captures on jamming for two figure sizes. The editor and button rectangles matched within 0.5 px at both sizes. SAVE and CANCEL returned matching comment text. The focused suite passed 47 tests.
arnodelorme commentedon Dec 1, 2026
Done: Matched the resizable dataset comments figure and verified SAVE, CANCEL and control rectangles on jamming
Pull request: #929
— eegprep, reported with orch done
claude commentedon Dec 1, 2026
🤖 Plan:
pop_comments.py, the Qt sizing code and EEGLABpop_comments.m(d0963be9)Research
EEGLAB does not use
inputguihere.pop_comments.m#L91-L135opens a plainfigure(default size) and places the axes title, the edit box and both buttons inNormalizedunits, relative to the default axespos = [.13 .11 .775 .815]. So every element, buttons included, scales with the window. EEGPrep renders aninputguispec with fixed pixel margins (170/35/170/50), 18 px spacing and fixed 150×45 buttons. The 456 px height has a separate cause: when the dialog has aQTextEdit,_apply_spec_sizesizes it to the text and skips thespec.sizeheight floor.Relevant code
pop_comments.py#L61-L85: spec with pixel margins and fixed buttonsqt.py#L1267-L1297: with an editor, height = text height andspec.size[1]is ignored (the cause of the 456 px)qt.py#L1258-L1264:setFixedSizebuttons, which cannot scale on resizeqt.py#L1063-L1072: textarea special case in row heightsProposed approach
EEGLAB geometry as figure fractions, with
s = pos(3:4)/100andq = pos(1:2):[0 10 105 85][0 -5 20 10][80 -5 20 10]_apply_spec_size, apply thespec.size[1]floor to editor dialogs too.pop_commentsis the onlytextareauser, so no other window changes. This fixes the 1394 × 456 part only.pop_commentsa smallQDialog, or anormalized_geometryoption onDialogSpec, whoseresizeEventsets each child's geometry from the fractions above, so the title, editor and buttons scale as in MATLAB. Theinputguirow layout cannot do this because its margins and buttons are in pixels. I suggest a dedicated helper inguifuncused only bypop_comments. Estimate: about 80–120 lines plus a Qt test that resizes to 950×620 and checks the button and editor rectangles against the fractions.tools/visual_paritycase at opening and at 950×620 and capture it against EEGLAB on jamming (eeglab-gui-visual-parity skill).Open questions
strmultiline(comments, 53)(53-column hard wrap, monospace?) or keep Qt soft wrap? This is pop_comments (Edit > About this dataset): graphical and numerical parity with EEGLAB #727 F9, which also changes the returned text, so it needs Arno's decision first.plottitlevs the fixedRead/Enter text -- pop_comments()) and the pale BACKCOLOR: fix them in the same PR as this one or separately under pop_comments (Edit > About this dataset): graphical and numerical parity with EEGLAB #727?