Qt: dark mode (System / Light / Dark theme setting) #50

Merged
btcbob merged 3 commits from feat/49-dark-mode-art into main 2026-11-11 01:45:43 +00:00
Owner

Closes #49. Requested by dokfaux on Dobbscord.

Adds a Theme setting to the Qt wallet: System / Light / Dark.

What changes

  • Setting: Options > Display > Theme, stored as QSettings theme, plus -theme=system|light|dark on the command line (also in -help). It takes effect after a restart, like Language.
  • Dark: Fusion style with a dark QPalette.
  • System: follows the OS. On Windows it reads AppsUseLightTheme from the registry. On macOS and Linux it uses the palette the platform already hands Qt. If the platform is already dark, its native style is kept and only the artwork switches. Light on a dark desktop uses Fusion's light palette.
  • Artwork: 21 dark variants in src/qt/res/icons-dark/ and images-dark/, registered in the qrc under the same aliases. Plain silhouettes are inverted. The Dobbs heads and the overview drawings keep their art with a light outline. The method is in icons-dark/README.md.
  • Loader: GUIUtil::ThemedResource()/ThemedIcon() return the dark variant when one exists and fall back to the original otherwise. Every QIcon(":/icons/...") call site, the console icons, the background tile and the .ui artwork go through it. App and tray icons are unchanged.
  • Colors fixed for dark: the sync progress bar, the intro error labels, the debug console's command teal, and the Mining page checkbox.

Light looks the same as before. The default is System, so existing users on a dark Windows desktop will get Dark after upgrading.

Commits

  • 6f55433d dark-mode art
  • b4c219f7 theme setting, loader, color fixes
  • 86893c1f Mining checkbox contrast

Testing

  • Builds clean with CMake (BUILD_GUI=ON) against Qt 5.15.8, Linux
  • Dark on Linux (regtest, Xvfb): Overview, Send, Receive, Mining, Transactions, Options > Display, debug console. Screenshots are in #49.
  • Light on Linux: Overview unchanged
  • Windows build: System picks up the registry setting
  • macOS build: System follows the appearance, native style kept
  • Debug window Information / Network Traffic / Peers tabs in Dark
  • 16px unit heads in the status bar at real size
Closes #49. Requested by dokfaux on Dobbscord. Adds a Theme setting to the Qt wallet: **System / Light / Dark**. ## What changes - **Setting:** Options > Display > Theme, stored as QSettings `theme`, plus `-theme=system|light|dark` on the command line (also in `-help`). It takes effect after a restart, like Language. - **Dark:** Fusion style with a dark `QPalette`. - **System:** follows the OS. On Windows it reads `AppsUseLightTheme` from the registry. On macOS and Linux it uses the palette the platform already hands Qt. If the platform is already dark, its native style is kept and only the artwork switches. Light on a dark desktop uses Fusion's light palette. - **Artwork:** 21 dark variants in `src/qt/res/icons-dark/` and `images-dark/`, registered in the qrc under the same aliases. Plain silhouettes are inverted. The Dobbs heads and the overview drawings keep their art with a light outline. The method is in `icons-dark/README.md`. - **Loader:** `GUIUtil::ThemedResource()`/`ThemedIcon()` return the dark variant when one exists and fall back to the original otherwise. Every `QIcon(":/icons/...")` call site, the console icons, the background tile and the .ui artwork go through it. App and tray icons are unchanged. - **Colors fixed for dark:** the sync progress bar, the intro error labels, the debug console's command teal, and the Mining page checkbox. **Light looks the same as before.** The default is System, so existing users on a dark Windows desktop will get Dark after upgrading. ## Commits - `6f55433d` dark-mode art - `b4c219f7` theme setting, loader, color fixes - `86893c1f` Mining checkbox contrast ## Testing - [x] Builds clean with CMake (`BUILD_GUI=ON`) against Qt 5.15.8, Linux - [x] Dark on Linux (regtest, Xvfb): Overview, Send, Receive, Mining, Transactions, Options > Display, debug console. Screenshots are in #49. - [x] Light on Linux: Overview unchanged - [ ] Windows build: System picks up the registry setting - [ ] macOS build: System follows the appearance, native style kept - [ ] Debug window Information / Network Traffic / Peers tabs in Dark - [ ] 16px unit heads in the status bar at real size
First pass at the art half of #49. 22 PNGs under the same filenames as
the originals: 18 in src/qt/res/icons-dark/, 4 in src/qt/res/images-dark/.

Plain silhouettes are color-inverted to #e8e8e8. The Dobbs heads and the
two overview drawings keep their original art with a light outline,
because inverting them produced a photo negative. Method is in
icons-dark/README.md.

Colored icons, splash screens and qrcode.png need no variant.

Not referenced from dobbscoin.qrc yet; the theme switch and loader
come in a follow-up commit.
Options > Display gets a Theme row, stored as QSettings "theme" and
overridable with -theme=system|light|dark. Takes effect after restart,
like the language setting.

Dark uses Fusion with a dark QPalette. System follows the OS: the
Windows AppsUseLightTheme registry value, or on macOS and Linux the
palette the platform already hands Qt. When the platform is already
dark, its native style is kept and only the artwork switches. Light on
a dark desktop uses Fusion's light palette.

GUIUtil::ThemedResource()/ThemedIcon() swap :/icons/X and :/images/X
for :/icons-dark/X and :/images-dark/X when dark is active and a
variant exists. All QIcon(":/icons/...") call sites, the console icons,
the background tile, and the .ui artwork with a dark variant go
through it. App and tray icons (networkstyle.cpp) are left alone, so
the unused dark dobbscoin_testnet.png is dropped.

Colors that were unreadable on dark: sync progress bar background,
intro error labels, debug console command teal.
It sits straight on the background tile, which is near-black in Dark,
and Fusion outlines the box in a darkened Window color. Lift Window and
Base on that one widget so the outline and box show.
btcbob merged commit a0488ac9ea into main 2026-11-11 01:45:43 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
SubGeniusFinance/dobbscoin-source!50
No description provided.