Skip to content

Add Dark (OLED) pure-black theme#13530

Open
ethandey wants to merge 1 commit into
keepassxreboot:developfrom
ethandey:feature/dark-oled-theme
Open

Add Dark (OLED) pure-black theme#13530
ethandey wants to merge 1 commit into
keepassxreboot:developfrom
ethandey:feature/dark-oled-theme

Conversation

@ethandey

@ethandey ethandey commented Jul 20, 2026

Copy link
Copy Markdown

Description

Adds a Dark (OLED) theme for pure-black UI, aimed at macOS OLED machines (pure black content + matching title bar), without changing the existing Dark theme.

Primary design target: macOS. The in-app theme uses the same Qt style path as Light/Dark, so Linux/Windows also get the pure-black window content if someone selects the theme — but title-bar blending is macOS-only and was what we built/tested for.

User-facing

  • View → Theme → Dark (OLED)GUI/ApplicationTheme=oled
  • Applies live via applyTheme() (same as Light/Dark)
  • Classic still requires restart (unchanged)

Implementation

  • New OledStyle + oledstyle.qss (true #000 window chrome, near-black elevated surfaces)
  • Stock Dark palette left as-is
  • macOS only: pure-black title bar / traffic-light strip while OLED is selected
    • Version-gated (@available)
    • Soft-fails on unsupported OS (Qt theme still works)
    • Does not set NSApp.appearance (avoids KVO/applyTheme recursion)
    • Skips sheets/floating panels

Screenshots

(Please test on macOS: View → Theme → Dark (OLED) vs Dark)

Testing

macOS (primary)

  • Select Dark (OLED) — pure black UI + black title bar, no restart
  • Select Dark — stock gray dark + normal title bar restored
  • Select Light / Auto — normal
  • Classic still prompts restart

Linux/Windows (optional / smoke — not the design focus)

  • Theme menu includes Dark (OLED) and content goes pure black
  • No macOS-only chrome code runs (ifdef)

Notes

Local packaging (app rename, update-check off) is not included — contribution-only theme change.

Introduce a selectable pure-black theme for OLED/AMOLED displays without
changing the existing Dark theme.

* View → Theme → Dark (OLED) sets GUI/ApplicationTheme=oled
* New OledStyle palette and stylesheet (true #000 window chrome)
* Live apply via applyTheme() like Light/Dark; Classic still restarts
* macOS: optional pure-black title bar when OLED is active, version-gated
  and soft-failing so unsupported OS versions keep the Qt theme only

Co-authored-by: Ethan <ethandey>
@droidmonkey

Copy link
Copy Markdown
Member

Screenshot?

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