Skip to content

Fix dark-mode dialog contrast#226

Merged
arnodelorme merged 2 commits into
developfrom
fix/dark-mode-dialog-contrast
Jun 17, 2026
Merged

Fix dark-mode dialog contrast#226
arnodelorme merged 2 commits into
developfrom
fix/dark-mode-dialog-contrast

Conversation

@suraj-ranganath

Copy link
Copy Markdown
Member

Apply EEGPrep’s light EEGLAB-style palette to progress dialogs and non-native Qt file pickers so dark-mode system palettes do not make navy labels unreadable. Adds focused GUI tests for the shared stylesheet and long-task progress dialog.

@claude

claude Bot commented Jun 12, 2026

Copy link
Copy Markdown

Claude finished @suraj-ranganath's task in 1m 23s —— View job


Code Review — PR #226: Fix dark-mode dialog contrast

  • Overall assessment: Looks good — safe to merge.
  • Highest-risk area: Qt stylesheet cascade scope on the main window.
  • Merge recommendation: Safe to merge.

Verified the new theme.py is correctly wired into the three call sites, no import cycle is introduced (theme.py imports only typing), and colors match the existing EEGLAB palette (#a8c2ff / #000066) already used in main_window.py, qt.py, listdlg2.py, and coregister.py.

Blocking

None.

Important

None.

Nits

  • Duplicated palette constantstheme.py:8-9 redefines EEGLAB_BACKGROUND = "#a8c2ff" / EEGLAB_TEXT = "#000066", which already exist as BACKEEGLABCOLOR/GUITEXTCOLOR in main_window.py:29-30 (and as _EEGLAB_BG/_EEGLAB_BLUE in coregister.py:36-37, plus hardcoded copies in qt.py/listdlg2.py). This new module is the natural canonical home for those values. Not required for this fix, but consolidating the existing duplicates onto theme.py's constants in a follow-up would reduce drift. Scoped-down change here is fine.
  • Unscoped QProgressBar selector — in theme.py, the QProgressBar / QProgressBar::chunk rules are not prefixed with QProgressDialog. When eeglab_floating_dialog_stylesheet() is concatenated into _main_window_stylesheet() (main_window.py:480), those rules become global and will restyle every QProgressBar in the app, not just the ones in progress dialogs. If that app-wide consistency is intended, ignore; otherwise scope them (QProgressDialog QProgressBar).
  • Disabled-text inconsistencyEEGLAB_DISABLED_TEXT = "#7c86a8" (theme.py:10) differs from the disabled menu color #64708f used in main_window.py:470. Different contexts, so likely fine, but worth a glance to confirm it's deliberate.

Test gaps

None blocking. The added assertions in test_gui_long_task.py and test_gui_main_window.py cover the progress-dialog and main-window stylesheet integration well. The QFileDialog-specific rules aren't directly exercised, but since they share the same generated string that is asserted on, a dedicated test isn't necessary.

EEGLAB parity notes

The palette and approach (light EEGLAB-style dialogs that resist dark system palettes) are consistent with the existing GUI styling, so EEGLAB users get the expected light-blue look regardless of OS theme. No parity concerns.

@arnodelorme arnodelorme merged commit 2e003b0 into develop Jun 17, 2026
9 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.

2 participants