Skip to content

Conversation

@Lunix-420
Copy link

@Lunix-420 Lunix-420 commented Nov 11, 2025

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:

  • Keeps breeze as fallback icon theme only (no forced widget style).
  • applies org.kde.desktop only if no QT_QUICK_CONTROLS_STYLE is set and QQuickStyle::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.

Comment out the line setting the QApplication style to 'breeze'.
Set default style and icon theme for application.
@github-actions
Copy link

github-actions bot commented Nov 11, 2025

@Digitalone1
Copy link
Contributor

Digitalone1 commented Nov 11, 2025

Sorry, but for me this is not good.

I tried these changes on Gnome 49 and this is the result:

Schermata del 2025-11-11 15-04-18

While this is the original one we always had:

image

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:

Schermata del 2025-11-11 15-21-56

image

And the footer:

image

image

@wwmm
Copy link
Owner

wwmm commented Nov 11, 2025

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.

@Lunix-420
Copy link
Author

Lunix-420 commented Nov 11, 2025

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.

Maybe we should force the Breeze style if we are outside KDE/Qt environments?

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.

@wwmm
Copy link
Owner

wwmm commented Nov 11, 2025

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.

@Digitalone1
Copy link
Contributor

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.

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.
@Lunix-420
Copy link
Author

Which desktop environment do you use?

I'm using Hyprland.

@Digitalone1
Copy link
Contributor

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.

@Lunix-420
Copy link
Author

Lunix-420 commented Nov 11, 2025

Okay, you are outside KDE and you use qt6ct, but not all users install qt6ct to use a specific 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.

Besides I use qBittorrent as Qt6 app and it is good without qt6ct, so I think they force their own theme.

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.

@Digitalone1
Copy link
Contributor

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 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 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 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.

Comment on lines +304 to +305
if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE") && QQuickStyle::name().isEmpty()) {
QQuickStyle::setStyle(QStringLiteral("org.kde.desktop"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Contributor

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.

Copy link
Author

@Lunix-420 Lunix-420 Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this change. It seems to fix the icon issue, but it also causes most UI elements (~90%) to ignore the qt6ct theme again. Interestingly, very few elements, like text field backgrounds or the active part of the slider rails, still respect the theme apparently.

With this change:
before

Before:
after

@Lunix-420
Copy link
Author

Lunix-420 commented Nov 11, 2025

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.

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 QT_QPA_PLATFORMTHEME is set to qt5ct or qt6ct and only force Breeze if it’s not? I think that should basically force Breeze for everyone not using qt6ct for theming, while still letting users change it if they do use qt6ct. I assume nobody sets that environment variable without actually using it.

Also, I think there’s a small misunderstanding. It’s not that all icons look fine under qt5ct/qt6ct. It’s just that ~3 miscolored icons felt like such a big improvement over everything being completely out of place that I didn’t notice it at first, only after the mention of the GNOME situation did I realize it. So there is definitely some issue here.


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.

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.

@Digitalone1
Copy link
Contributor

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 QT_QPA_PLATFORMTHEME is set to qt5ct or qt6ct and only force Breeze if it’s not? I think that should basically force Breeze for everyone not using qt6ct for theming, while still letting users change it if they do use qt6ct.

Yes, it does not seem a bad idea to me.

@wwmm
Copy link
Owner

wwmm commented Nov 11, 2025

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 QT_QPA_PLATFORMTHEME is set to qt5ct or qt6ct and only force Breeze if it’s not? I think that should basically force Breeze for everyone not using qt6ct for theming, while still letting users change it if they do use qt6ct.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants