-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
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. |
Is it possibly a Wayland issue? I'm running Hyprland. |
I use a KDE Plasma Wayland session and don't have this issue, maybe it's something to do with Kvantum or qt6ct. |
@GHU7924 @C4ndyF1sh Can you try the latest commit on Windows and macOS? From what I've seen (and tested) I'll have to disable widget style selection for Windows and disable the "System" color theme for macOS since it's broken with light mode, and I'm trying to see if there are any other options (I'm not very experienced with Qt for platforms other than Linux). |
I confirm that in Windows, the system theme is not selected in the emulator settings, but only Fusion. Depending on the color mode, the system theme adjusts and switches between Dark and Light. You should also update your PR first to apply the new changes that were made to PR #2213. |
@tomboylover93 I honestly don't know what the problem is, but I have it that way. 2025-01-23.19-29-30.mp4 |
@DanielSvoboda I agree, but I suggested doing this: #1828 (comment) (The volume icon would change every 33%) |
Don't worry, there may still be a few more edits in the future as more improvements, fixes, and new features are added )) |
@DanielSvoboda Do you happen to know how I can grey out a QComboBox element based on what operating system the app was compiled for? |
This is what my Windows window looks like at the moment. The problem of the light theme remains. @tomboylover93 At the next PR update, can you make the edit that @DanielSvoboda suggested? |
I think it would be better to just ->hide() the groupbox entirely, and hardcode to fusion. I believe I showed you an example of #ifdef previously here, thats for selectively applying code to certain definitions (such as OS) |
What I'm doing currently is using |
@tomboylover93 To be honest, I hate to say this, but maybe you should close your PR or postpone it in order to return to it in the future as a new PR. You tried very hard, but it turned out that the systems are very different, and we can't put everything together. I really want to help you, but since I don't have any programming knowledge, unfortunately I can't offer you solutions. I tested your latest PR and I also have a large distance between the label and the slider. My last idea is to close this PR and open a new one containing all the changes at the moment from Main. Windows = System + Fusion |
If anyone with more Qt experience than me (and especially for more than one platform, as I've learned that writing the best code you could write for the platform that you yourself use is not a good idea) is willing to do it, then that's fine. That said, I think the Linux part is pretty much done, so anyone could just use this as a base while improving it on the Windows and macOS side. |
I think that if someone wants to continue your work, it will probably be easier for them to do everything from scratch than to fix existing code. This way the author will have more control over the code and he will know what is implemented and what is not. @tomboylover93 No negativity towards you, you did well. If you will be doing any PR in the future and you need help with testing, then do not hesitate to contact me, I will be happy to help you (if my knowledge is enough to give you good feedback). |
I think I'll do one last rebase to make sure it's in a more usable state (doesn't really do anything because this repo has new PRs and commits every day, but why not) and move it to an archive branch and then close this PR. Then I'll open one just for the widgets part and fix the issues with Windows (as I could confirm from other people that the system widgets work as they should on macOS). That should be simple to do. The color themes part, and specifically the issue you described where the accent color doesn't work with the Windows light theme, is not something I could fix considering my knowledge (or lack thereof) of how Qt works on other platforms. |
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.