trialuser02 / qt6ct

Qt6 Configuration Tool
BSD 2-Clause "Simplified" License
128 stars 10 forks source link

Add KDE theming support #43

Open ilya-fedin opened 4 months ago

ilya-fedin commented 4 months ago

KDE applications are a notable part of the popular Qt software in the Linux world. Sadly, they have their own theming add-ons that are applied through QPlatformTheme.

This adds support for all aspects of the KDE applications theming present in the plasma-integration QPlatformTheme:

I also have a qt5ct variant of this patch but I don't have a SourceForge account nor SVN experience to send it there... If you wish I can upload the patch here as a file.

spikespaz commented 3 months ago

Do you know the name of the Qt module that provides QQuickStyle? I thought it was qtdeclarative but maybe not. It's failing to find that include. Trying to build with Nix.

ilya-fedin commented 3 months ago

@spikespaz I have a package (and a module) for nix in https://github.com/ilya-fedin/nur-repository. Regarding the Qt module, yeah, it's qtdeclarative.

mechakotik commented 3 months ago

Tried it out, most KDE apps work fine for me, but Plasma system monitor doesn't follow the color scheme correctly and looks like this: image Here are the logs:

kf.config.core: Watching absolute paths is not supported "/home/mecha/.local/share/color-schemes/BreezeDarkTeal.colors"
kf.kirigami.platform: Failed to find a Kirigami platform plugin for style "Fusion"
qrc:/qt/qml/org/kde/ksysguard/page/EditablePage.qml?page=history.page:223:9: QML Loader: Binding loop detected for property "height"
file:///usr/lib/qt6/qml/org/kde/kirigami/Dialog.qml:334:18: QML ScrollView: Binding loop detected for property "calculatedImplicitWidth"
file:///usr/lib/qt6/qml/org/kde/kirigami/Dialog.qml:386:33: QML Binding: Binding loop detected for property "target"
qml: Implementation matching https://systemd.io/DESKTOP_ENVIRONMENTS/ was not found. ApplicationsView will not be available

KDE system settings app has the same problem.

ilya-fedin commented 3 months ago

Should be ok now

Hasshu commented 3 weeks ago

@trialuser02 Is there anything blocking this PR?

spion commented 1 week ago

FWIW I tried this patch and it seems to affect the "dark mode" setting on my system in browsers like Chromium (that is, dark KDE themes don't seem to make chromium think the system is set into "dark mode", but color schemes do)

Its also probably a good idea to disable copying the KDE themes as the created copies don't work

ilya-fedin commented 1 week ago

Its also probably a good idea to disable copying the KDE themes as the created copies don't work

What copying are you talking about?

spion commented 1 week ago

What copying are you talking about?

Next to the color scheme dropdown, there is an actions dropdown menu with a "Create a copy" item. I wanted to use it to try and tweak the KDE scheme and see if I can get it to trigger "dark mode". This created a copy of the file under ~/.config/qt6ct/colors that doesn't work when selected.

ilya-fedin commented 1 week ago

Next to the color scheme dropdown, there is an actions dropdown menu with a "Create a copy" item.

Should be hidden now