-
-
Notifications
You must be signed in to change notification settings - Fork 315
Respect user-defined Qt style instead of forcing Breeze (fixes #4332) #4354
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
base: master
Are you sure you want to change the base?
Conversation
Comment out the line setting the QApplication style to 'breeze'.
Set default style and icon theme for application.
|
Workflow failed, but the following artifacts are still available for this pull request: |
|
Sorry, but for me this is not good. I tried these changes on Gnome 49 and this is the result: While this is the original one we always had: This is just bad, I can't even see some buttons since I can't distinguish them from the background. Take a look at the plugin list, the menu button for bypass and remove controls are barely visible in the first screenshot. Icons for action buttons are not visible either. Maybe we should force the Breeze style if we are outside KDE/Qt environments? Update. This is the Autogain comparison: And the footer: |
|
I am looking at @Digitalone1 images and I have to agree that on gnome this is a downgrade. It is clear that we will need the guidance of a Kirigami developer on this. There is probably a reason why Kirigami's tutorial forces the Breeze theme. |
|
Yeah, something is not quite right with the icons on this. The weird thing to me is, that it doesn't seem to affect all icons.
I don't think so, forcing the breeze style with is what causes it to ignore the system theme. I think ideally, it should force the breeze icons, without forcing the entire breeze style, but not sure. |
|
Right now I am talking to pipewire's developers on their matrix channel trying to find a good way to implement preset autoloading. So I am not sure about when I will be able to look at this theme situation. |
Yes, but we don't live in an ideal world unfortunately, so since the system theme is not good outside KDE, forcing the Breeze icon only outside KDE does not seem a bad idea. Which desktop environment do you use? |
Updated style and icon theme handling in main.cpp.
I'm using Hyprland. |
Okay, you are outside KDE and you use qt6ct, but not all users install qt6ct to use a specific theme. Besides I use qBittorrent as Qt6 app and it is good without qt6ct, so I think they force their own theme. |
I don't know much about KDE, but I was under the impression that almost all qt6ct users are on something other than KDE. From what I understand, KDE has its own first-party system for managing Qt themes and actually discourages the use of qt6ct. Outside of KDE though, on most enviroments qt6ct is basically the only reliable way to theme Qt apps.
I don’t think qBittorrent forces any specific style by default. It will pick up the qt6ct theme if present, but it also has its own internal theming system that can override the system style when enabled. |
I suppose most of the people don't have qt6ct installed. So I think we have to care about how they see the application on the first launch without forcing them to install qt6ct. In this case, if we force the Breeze theme, I don't think it's worse of showing a bad user interface. I'm afraid we could resolve this issue diversifying between desktop environments, just like we did for the XDG Global Shortcuts.
I don't know, but I remember how horrible it was some years ago, so they made something to improve its look under Gnome without qt6ct. |
| if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE") && QQuickStyle::name().isEmpty()) { | ||
| QQuickStyle::setStyle(QStringLiteral("org.kde.desktop")); |
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.
| if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE") && QQuickStyle::name().isEmpty()) { | |
| QQuickStyle::setStyle(QStringLiteral("org.kde.desktop")); | |
| if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE")) { | |
| QQuickStyle::setStyle(QStringLiteral("org.kde.desktop")); |
org.kde.desktop allows to follow the QStyle in a QML app. Don't use any of the default QQuickStyle as they are all quite bad
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 applied this and Breeze style is used on Gnome.
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.
Yeah, I totally get that, seeing a messy UI on first launch is a bigger problem than the app not following the theme. Maybe we could check if
I only switched to Linux about two years ago, so I can’t really comment on the older situation. But I can say that right now qBittorrent looks way better than I remember it from when I was using Windows. |
Yes, it does not seem a bad idea to me. |
I do not have any problem with this workaround. But since we are trying to "better follow Kirigami's guidelines" it would be good to also understand why the procedure in its tutorial is not working well in this case. |








This PR removes the hardcoded
QApplication::setStyle("breeze")call and updates the Quick Controls style initialization logic.Previously, EasyEffects forced the Breeze widget style regardless of user or system configuration, which broke theming under qt6ct. (see #4332)
The new logic:
org.kde.desktoponly if noQT_QUICK_CONTROLS_STYLEis set andQQuickStyle::name()is empty.Allows user-configured system QT themes to take effect properly.
There still seem to be a few of icons that don’t theme correctly, but I’m looking into that. Also, I’m not sure if this has any negative impact on systems that don’t have a system theme as I can't really test that on my machine.