Skip to content

Remove dark mode functionality and simplify palette management#899

Open
ea4k wants to merge 3 commits intomasterfrom
claude/review-qt6-issue-kmovl
Open

Remove dark mode functionality and simplify palette management#899
ea4k wants to merge 3 commits intomasterfrom
claude/review-qt6-issue-kmovl

Conversation

@ea4k
Copy link
Owner

@ea4k ea4k commented Mar 16, 2026

Summary

This PR removes the dark mode feature and simplifies palette management across the application by using Qt's unsetPalette() method instead of manually managing black/white text palettes.

Key Changes

  • Removed dark mode infrastructure: Deleted all dark mode toggle buttons, settings, and related UI from the setup dialog's color page

  • Simplified palette handling: Replaced conditional palette assignments (palBlack/palWhite) with unsetPalette() calls to use system defaults for valid input states

  • Removed dark mode state management: Eliminated darkMode boolean variables and setDarkMode() methods from:

    • MainWindowInputQSO
    • MainWindowInputOthers
    • MainWindowMyDataTab
    • MainWindowSatTab
    • SetupPageColors
    • MainQSOEntryWidget
    • MainWindow
  • Cleaned up settings: Removed dark mode persistence from configuration files (DarkMode setting no longer saved/loaded)

  • Removed helper methods: Deleted readDarkMode(), getDarkMode(), and related signal/slot connections throughout the codebase

  • Removed unused palettes: Eliminated palBlack and palWhite palette objects, keeping only palRed for validation error states

Implementation Details

  • Input validation now uses a consistent pattern: valid inputs call unsetPalette() to restore default appearance, invalid inputs use palRed for error indication
  • The application now relies on the system/application-wide palette for normal text colors instead of managing them per-widget
  • Removed the darkModeChanged signal that was emitted from SetupPageColors and connected throughout the application

https://claude.ai/code/session_01RR2CidMv5V9znTPtUCtuu1

Replace the hand-rolled dark mode system (DarkMode config key, button in
Colors setup page, custom QPalette overrides via setStyle("fusion") and
qApp->setPalette()) with Qt6's built-in platform theme integration.

- Remove SetupPageColors darkModeButton, darkMode flag, setDarkMode(),
  loadDarkMode(), getDarkMode(), slotSetDarkMode(), darkModeChanged signal
- Remove SetupDialog loadDarkMode() and darkModeChanged signal chain
- Remove MainWindow setDarkMode(), slotDarkModeChanged() and DarkMode
  settings read
- Replace all if(darkMode){setPalette(palWhite)}else{setPalette(palBlack)}
  patterns with widget->unsetPalette() across MainWindowInputQSO,
  MainWindowInputOthers, MainWindowMyDataTab, MainQSOEntryWidget,
  MainWindowSatTab and SetupPageELog
- Remove palBlack and palWhite from all widget headers; keep only palRed
  for validation error highlighting

KLog now respects the OS dark/light theme automatically and reacts to
theme changes at runtime via Qt6's platform integration. Closes #392.

https://claude.ai/code/session_01RR2CidMv5V9znTPtUCtuu1
@barjac
Copy link

barjac commented Mar 16, 2026

Oh! That is a shame. I only use dark mode :(

claude added 2 commits March 17, 2026 07:38
…ARM hamlib

- elog classes were moved to src/elog/ subdirectory; update all four
  references (elogclublog, elogqrzlog, lotwutilities, eqslutilities)
  in both HEADERS and SOURCES sections
- Add missing DataCache (src/database/datacache.h/.cpp) which is required
  by DataProxy_SQLite but was absent from the test target, causing linker
  errors for all DataCache methods
- Add /opt/homebrew/Cellar/hamlib include/lib paths for Apple Silicon Macs
  alongside the existing /usr/local paths (matching src/src.pro)

https://claude.ai/code/session_01RR2CidMv5V9znTPtUCtuu1
The file was named 'subdvisions' (missing 'i') instead of 'subdivisions'.
Rename the file and update all references across:
- src/database/db_adif_primary_sub*visions*_data.h/.cpp (renamed + include guards)
- src/database/database.cpp (#include)
- src/src.pro, src/CMakeLists.txt
- All test .pro and CMakeLists.txt files
- tests/tst_logwindow and tst_database .cpp files
- .gitignore (moc_ generated file entries)

https://claude.ai/code/session_01RR2CidMv5V9znTPtUCtuu1
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
62.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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.

3 participants