Skip to content

Add dark theme support via Qt Fusion palette#301

Open
nicks6240 wants to merge 1 commit intonickbnf:masterfrom
nicks6240:feature/dark-theme
Open

Add dark theme support via Qt Fusion palette#301
nicks6240 wants to merge 1 commit intonickbnf:masterfrom
nicks6240:feature/dark-theme

Conversation

@nicks6240
Copy link
Copy Markdown

@nicks6240 nicks6240 commented Mar 20, 2026

Summary

  • Adds Dark theme checkbox under Options > Appearance (requires restart)
  • Applies Qt Fusion style + a tuned dark \QPalette\ at startup when enabled
  • Replaces all hardcoded colors in the log view paint path with \QPalette\ role lookups so they adapt automatically to both light and dark themes
  • Setting persists as \�iew.darkTheme\ in the ini file; defaults to off so existing users are unaffected

Files changed

File Change
\src/configuration.h/cpp\ Add \darkTheme_\ bool with accessors and persistence
\src/main.cpp\ Apply Fusion style + dark QPalette before MainWindow creation
\src/abstractlogview.cpp\ Replace hardcoded Qt::darkGray, Qt::lightGray, Qt::white, black/yellow QF highlight, lightyellow pull-to-follow with palette role lookups
\src/optionsdialog.ui/cpp\ Add Appearance group box with dark theme checkbox

Test plan

  • Build with Qt5 + qmake and confirm no compile errors
  • Launch without dark theme enabled - verify light theme looks identical to before
  • Enable dark theme in Options, restart - verify dark UI throughout (menus, dialogs, log view, search bar)
  • Open a log file and search to verify quick-find highlights are visible on dark background
  • Toggle line numbers on/off and verify gutter/line-number area colors look correct in both themes

Adds a Dark theme checkbox in Options > Appearance. When enabled,
applies Qt Fusion style with a full dark QPalette at startup. All
hardcoded colors in the log view paint path (gutter, line numbers,
quick-find highlight, pull-to-follow bar, normal bullet) are replaced
with palette-role lookups so they adapt to both light and dark themes.
Setting persists as view.darkTheme in the ini; restart required.
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