Skip to content
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

Add KDE theming support #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ilya-fedin
Copy link

@ilya-fedin ilya-fedin commented Mar 11, 2024

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:

  • KDE's QtQuick style bridging the currently set QtWidgets style (you may want to get QtQuick style choice in the settings UI in the future instead)
  • KDE's color schemes (the most important part as KDE applications don't fallback to QtQuick style/QtWidgets style/QPalette for colors)
  • KDE's icon engine applying KDE's color schemes to icons (to not to have black icons on black background)

I haven't implemented preview for KDE color schemes as I don't really need it. I can try to make the preview part of the dialog to be hidden when a KDE color scheme is chosen or I can leave it as it is if you wish to implement it later.

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
Copy link

spikespaz commented Mar 28, 2024

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
Copy link
Author

ilya-fedin commented Mar 28, 2024

@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
Copy link

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.

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:
* KDE's QtQuick style bridging the currently set QtWidgets style (you may want to get QtQuick style choice in the settings UI in the future instead)
* KDE's color schemes (the most important part as KDE applications don't fallback to QtQuick style/QtWidgets style/QPalette for colors)
* KDE's icon engine applying KDE's color schemes to icons (to not to have black icons on black background)
@ilya-fedin
Copy link
Author

Should be ok now

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.

None yet

3 participants