New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DolphinQt: Allow forcing light or dark style on Windows. #12272
DolphinQt: Allow forcing light or dark style on Windows. #12272
Conversation
LGTM. (untested) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on Windows 10. Works as expected.
Is there a reason the parenthesis are included? ( ) is this just to differentiate Dolphin bundled Style vs User Style*?
Yes, that was my intent, but if someone has a better idea how to differentiate them I'm all ears. |
This makes it so that if you just want to reload the current style (eg. on program start, or in response to a system event), you don't need to know the name of the currently selected user style. It's also more consistent with the way the 'userstyle/enabled' flag works.
…dark style can be manually selected.
de436c4
to
ed6014d
Compare
The UI looks perfect to me. One nitpick, though, the title bars don't seem to follow a forced dark mode, e.g. forcing dark mode while Windows is in light mode will render light title bars (forcing light mode while Windows is in dark mode will correctly apply light title bars, though). Could you fix that, so a forced dark mode render dark title bars, regardless of the Windows setting? It would be nice if this could be extended to the other desktop OSes we support at some point... |
… bars on Windows.
Better now? You may have to restart Dolphin after changing the theme to get the correct result for the title bars. |
I got stuck looking for a way to do this in macOS. I'm not well versed in Objective C APIs. Good on you for getting this done 😃 |
This has been requested a few times since the introduction of the Windows dark style. #12180 also attempted to do this but it seemingly stalled out.
Windows-only for now. I'd have to investigate if there's a way to override the system style when it's automatically managed by Qt for the other OSes.
UI-wise, this reuses the User Style dropdown to now also switch between System, Light, and Dark. (On OSes other than Windows Light and Dark will not be in the dropdown.) The checkbox to enable user styles has been removed, the dropdown is now always visible and shows both our builtin and the user styles.
Before:
![ui-before](https://private-user-images.githubusercontent.com/4522237/280484180-f6da1760-5af4-4f7d-9fc3-81e8cabdc24f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnV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