-
-
Notifications
You must be signed in to change notification settings - Fork 807
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. |
The issue is the combination of system widgets with themes that enforce conflicting text colors. you can see it in the video I have above |
To my knowledge, the Gruvbox theme is the only one that enforces a specific text color, every other theme uses |
That would be forcing the text to white yes, most of the themes are darker background |
Pushed it to my qt-style-test branch. Can someone try this action? |
@tomboylover93 The problem is that if the system theme is selected in GUI Settings, then everything breaks. That's where the problem lies. This is where the distortion occurs due to the color mismatch. With Fusion, all 7 themes seem to be working fine. The fact is that Windows has always had a light theme. I see a possible solution in the following: It seems that if you select a system theme in the GUI settings, and then select one of the themes (View - Themes), then switch to Fusion and (View - Themes) select a light theme, then distortion also occurs. |
GUI Settings - Current Widget Style = System GUI Settings - Current Widget Style = System |
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? |
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.