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
Add custom dark theme for Windows. #12080
Conversation
a71c65a
to
a3cb1d2
Compare
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.
I didn't look through the qtrcc.targets in detail but code wise I didn't see anything concerning. LGTM. Untested, I'll leave that to others.
Ah, good catch, yes that should be adjusted.
Yeah Qt has some really weird ideas about how these dotted lines work, I had to manually adjust them elsewhere too. I'll try to see what's possible there...
I believe that's intentional, I'll check how dark themes on Linux behave there.
Yes, I also noticed that but didn't look into why that happens. A few debugger widgets have the same issue. I'll check it out and compare with Linux.
Yes, this is a very long-standing issue that I've noticed before too, something in that tab takes a really long time to apply when a setting changes. I'd say this is out-of-scope here, but definitely something worth looking into. The general (non-Graphics) Config is pretty neglected in general, it doesn't even use the fancy tooltips...
Definitely possible, but we'd have to introduce a 'default' option for otherwise we can't distinguish between a user manually picking Clean or wanting the default theme. But yes, that's a good idea.
|
|
Regarding the clean theme, whether Clean Lite or just regular dark grey Clean is better depends on how dark the dark mode is. I designed Lite for Dolphin skins with ~30% brightness (#4d4d4d), where the dark grey clean icons blend in with the dark grey skin and disappear. However, the Lite theme can be too bright against REALLY dark dark skins, like, at near black (~10% brightness), lite is quite contrasty, and the regular dark grey clean icon theme can be "better". I mean, some people like the high contrast icons and some people don't, depends on the dark mode user really. But at < 10% brightness the lite theme is outside the contrast I designed it for. Basically what is "better" for dark mode users will depend on how dark the skin we ship is, and how contrasty you want the buttons to be. And also how contrasty the average dark mode user wants the buttons to be I guess. EDIT: For reference, the Qt theme in the screenshots currently have 13% brightness. That's really dark, and I'd argue that it is dark enough that we don't even need to worry about changing to Clean Lite. But the Lite theme isn't that bright so I don't think it would be bad or anything. Up to what you and dark mode users in general want I guess? |
I normally use light mode during the day and dark mode during the night. Windows doesn't have automatic theme switching built-in, but whether you do it manually (on Windows' theme settings) or automatically with a 3rd party app (e.g. by using Auto Dark Mode -- my case), apps already running when the theme is changed just... changes themselves as appropriate, no message, notification, or anything else (that also includes most websites already loaded up in the browser). There's certainly apps that have a dark mode but doesn't support automatic theme switching out there, but it's a nice to have. Anyway, not a blocker for this PR, I mentioned it assuming it's easy to do, since current master seems to already supports that if you launch Dolphin with the Fusion theme... |
|
To be clear, I'm talking about the Windows Message Queue which is used to inform programs about various system events. I would expect theme change to be part of that, because otherwise I have no idea how to even notice that the theme has changed short of polling every once in a while. e: Indeed, you apparently get a WM_SETTINGCHANGE with the value |
7e83dc9
to
a36d8e1
Compare
I was unable to find a way to fix this, so I worked around it by disabling the dotted box (it's called 'outline' btw) and applied an underscore to the text instead.
This is now implemented. The title bar doesn't switch to dark properly on the light -> dark switch because Qt apparently resets it by itself in response to the message, which I'm not sure if we can do anything about unless we do something really hacky with intentional time delays. |
e18917b
to
2150e6a
Compare
|
Okay, I think I'm done, please re-check. I have checked the C-Stick on a Linux dark theme and it's also black there, so I kept this for now. I'm open to change this though if we want this. |
|
Fixed the Skylander colors, mapping window lines, and game list highlight (although that one feels like a Qt bug to me, I don't think an item should stay in the focus color when it's no longer in focus...?). I'm not sure how to change the color of the the Skylander/Infinity separators, though I don't think that's really a big deal -- in fact, the more I stared at those windows the more I'm convinced they need an overhaul in general. Why are those separators even there if the entire item is one line? Why is the 'Skylander #' text a separate label instead of part of the radio button? Why does the slot list expand vertically when you increase the window size? Why are the textfields not aligned with eachother? What is going on with the spacing around the Emulate Infinity Base checkbox? Why is the Active Infinity Figures subpanel enclosed in two borders? Whatever. Maybe I'll do a follow-up. I checked the C-Stick indicator and that color is chosen programmatically from the light theme base color, so it's nontrivial to pick a better color here without also changing the light theme one or changing all the colors that pass through this function in a dark theme. I think we're probably better off changing that so we pass two colors (for light and dark themes), but yeah I don't think that's super important so we can do this in another PR... |
|
There's one last thing, then this LGTM: the custom colors from the Skylanders list doesn't react to theme changes. E.g. if Dolphin launched in dark mode, the Skylanders list will retain their dark colors until Dolphin is relaunched, same thing if you've launched in light mode and later on Windows switches to dark mode, the list will retain the light colors until Dolphin is relaunched... |
Co-authored-by: FearlessTobi <thm.frey@gmail.com>
…a system-wide dark theme.
… ones on Windows.
…dows dark theme is in use.
…els that explicitly request palette colors get the wrong colors otherwise.
b4f8c5b
to
24012cf
Compare
Should be fixed. |
|
@AdmiralCurtiss FYI, was planning to use your custom theme in DME. Do you have any issues with that? |
|
It's part of Dolphin so you can use it anywhere that respects the license. But yeah go ahead and use it there, I have no issues with it. |








Hopefully the last PR for this...
This adds a custom theme (written from scratch by me, designed to mimic our default Windows theme but dark) for use on Windows since Qt lacks proper dark theme support by itself on Windows when using the QWindowsVistaStyle (which is the style we use on Windows). It also checks whether the system is using a dark theme and automatically switches Dolphin to the theme if it does. The style is embedded into the executable via Qt's resource compiler. Additionally, if it detects a Windows-wide dark theme, it changes the window decorations (ie, the title bar color for windows) to dark ones.
This PR was triggered by response from my comparison of available options for Windows dark themes here: #11446 (comment) We pretty much unanimously decided against Qt's Fusion theme and decided to either go with the theme from #11446 or my theme if I could finish it. So I finished it. There might still be some minor issues here and there which I'll fix up if I notice them or someone brings them to my attention. I might also add some more highlights and hover colors, but the basic look of the theme is done.
Screenshots: Overview | Controller Window | Menu
Note that the sliders are too bright right now. This stems from this ancient Qt bug that breaks the slider ticks if you try to change its color via stylesheet. There is a workaround, but I figured this PR is already big enough as-is and that fixing that would make more sense as a follow-up.