-
-
Notifications
You must be signed in to change notification settings - Fork 860
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
style: Add options for system colors and system Qt widget styles #1828
base: main
Are you sure you want to change the base?
Conversation
Widget repainting isn't implemented yet, it's necessary to close and reopen shadPS4 after changing widget style
For checking system dark mode, you can try if QGuiApplication::styleHints()->colorScheme() == Qt::ColorScheme::Dark for refreshing widgets after a save/apply, i think you can have update->widget every widget and then QCoreApplication::processEvents after clicking apply/save (or if i remember right i put the same function for both, if so that would work better). also i still think the widget style selection is better placed over/under where the theme selection is |
I tried both of these. The first one broke all themes and their icon colors and the second has no effect. Unless I missed something? As for placing the widget style selection on the View menu, I tried that before I decided to make a group box in the settings menu for it, and the emulator segfaulted immediately, so I went with the latter. |
Just to check, does it work as intended if the widget and theme are set to System and with the Windows color mode set to either dark or light? |
This is a strange case. Either I combine the System color theme and widget style into one (which I haven't figured out how to) or I grey out the System option on Windows, which neither is ideal, but the latter is better than the former as it is currently hardcoded to use Fusion because most of the UI was built around it, and Windows has the largest userbase out of all the 3 OSes supported by shadPS4. Besides that, I also need to know how this works in macOS. |
I think that somehow you need to remove the "Not OK" option, leaving only both options OK. |
I'd have to remove every theme other than System, which means this probably won't get merged. Unless I reworked the theme system to use the Fusion widget for other color themes, like what PCSX2 and Duckstation do. |
@tomboylover93 Look at PR 1855, something similar was done there. Yes, PR is completely different, (but if there are items in the menu, you cannot select them, because there is no checkbox in the checkbox). Maybe this can be somehow transferred to the Current Widget Style selection. |
Seems like a good alternative, I'll look into it. |
@C4ndyF1sh , you can help @tomboylover93 test this PR on MacOS? |
@GHU7924 |
@GHU7924 I switched to light mode but shadps4 doesn't, I even restarted shad (Tried with system theme on and off) |
@C4ndyF1sh In General, try Current Widget Style = System. You can see our comments above and compare them with your experience to see if you have similar problems. Thank you for responding. P.S. I haven't tested the new build yet, I'll do a test in the near future. |
@tomboylover93 Perhaps it would be better to replace the style selection with Radio buttons? Fusion - all themes are available. |
I could do that but I don't know how to combine both Qt themes and color themes, nor how to block "Themes" from being clicked when selecting System. |
@tomboylover93 Then you should mark your PR as a draft. Perhaps @f8ith or @DanielSvoboda they will give you some tips, or maybe not. |
@C4ndyF1sh Can you try the latest commit? |
I forgot to put this here, but I did some testing with a Windows 10 virtual machine (I had to use Mesa's 'lavapipe' Vulkan drivers to get it to open, because it's a virtual machine and shadPS4 requires Vulkan 1.3 support). Here's what it looks like with the Windows color theme set to "Dark", the app's color theme set to "System" and the widget style set to "Fusion": And with the widget style set to "System": In the 2 weeks since my last commit to this PR I have not been able to figure out the problems with Windows and the "System" widget style, and they only work fine with "Fusion" which is what the app is hardcoded to use. I think I'll gray out the widget style option on Windows, and possibly macOS. |
Taken from https://github.com/tomboylover93/shadPS4/releases/tag/v0.4.1_WIP_qt-style:
QT_STYLE_OVERRIDE
environment variable, as long as it's set to "System". You can tweak this on config.toml with the linewidgetStyle = "Fusion"
. Since I couldn't figure out how to repaint all widgets after clicking on either "Save" or "Apply", this doesn't reflect in real time and you need to close and reopen shadPS4. Tested on Linux with KDE Plasma. Untested on Windows and macOS.Screenshots (taken on Linux with KDE Plasma):
Additional screenshots
This is purely cosmetical and should not affect the usability of the emulator in any way, but if you do have issues with it, such as the emulator not launching or the color/widget style changes not working, please let me know.