Skip to content

frontend: Add auto light/dark theme switching support#13213

Draft
cammo1123 wants to merge 1 commit intoobsproject:masterfrom
cammo1123:feature/add-auto-light-dark-theme
Draft

frontend: Add auto light/dark theme switching support#13213
cammo1123 wants to merge 1 commit intoobsproject:masterfrom
cammo1123:feature/add-auto-light-dark-theme

Conversation

@cammo1123
Copy link

Description

Adds an optional "Match System" mode that detects the OS light/dark preference via Qt::ColorScheme and a small watcher component, and switches between user-selected Light/Dark OBS themes automatically.

I don't have the capacity to test this on Linux/MacOS, but this should be programmed in a way that makes it cross-platform. Windows seems to take a while to propagate the theme change, but this seems to be just as quick as other apps (as demonstrated in my video with the file explorer on the top left).

I've had this lying around for a few months, so figured I would put in a pr and see what the consensus is. It's currently on by default; feedback on this would be greatly appreciated.

image
2026-03-12.00-51-42.mp4

Motivation and Context

Most OSs expose a system-wide light/dark preference. Many apps can follow it automatically, obs doesn't. This keeps the old behaviour and adds a new opt-in/out "Match System" option. It should be cross-platform by design as it relies on Qt::ColorScheme.

How Has This Been Tested?

  • Hardware:

    • Windows 11, Qt version as in the current OBS build.
    • RTX 4060Ti
    • Ryzen 7 3800X
  • Scenarios:

    • Toggled OS light/dark; OBS updated theme immediately without restart.
    • Manually selected Light/Dark themes.
    • Disabled "Match System" and OBS reverted previous behaviour.
    • Restarted OBS and settings persisted.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

Integrates auto theme selection using system theme
detection with `Qt::ColorScheme` and a new watcher
component. Updates settings UI to allow separate
configuration for light and dark themes.
@cammo1123
Copy link
Author

cammo1123 commented Mar 11, 2026

I can see the build errors, will fix them when I have a chance.

Update: The default QT6 package version is 6.4.2 on Ubuntu, and this requires 6.5. I'll wait until this is bumped above 6.5

@cammo1123 cammo1123 marked this pull request as draft March 12, 2026 10:32
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