| Summary: | QtQuick Controls Button does not inherit from Kirigami.Theme when using Kirigami.Theme.inherit: true | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-kirigami | Reporter: | Thiago Sueto <herzenschein> |
| Component: | general | Assignee: | kdelibs bugs <kdelibs-bugs-null> |
| Status: | REOPENED --- | ||
| Severity: | normal | CC: | nate, notmart |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | Not decided | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/frameworks/qqc2-desktop-style/commit/03da9da594de0cbf2aa74b68c4a213b2755c5529 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
| Attachments: | Kirigami.Theme.inherit example from Colors tutorial. | ||
|
Description
Thiago Sueto
2023-01-30 20:45:34 UTC
reproduced, and there are 2 issues there: * the inherit mechanism doesn't work up to ApplicationWindow but only between items * things painted with qstyle appear to not be using the palette coming from Kirigami Theme, this was done in commit 939176f4a556ed38570db6e6735ba44a1015ea67 of qqc2-desktop-style in response to https://bugs.kde.org/show_bug.cgi?id=406295 A possibly relevant merge request was started @ https://invent.kde.org/frameworks/qqc2-desktop-style/-/merge_requests/228 Git commit 55f5eb707b17d47bd3e776f803f1656ff5ff2e47 by Marco Martin. Committed on 07/02/2023 at 09:06. Pushed by mart into branch 'kf5'. use again the palette coming from Kirigami.Theme It's supposed to be possible to change "color set" of controls by setting their inherit flag to false, but at some point that got broken in commit 939176f4a556ed3 as a fix to bug 406295 but this caused bug 465054 bring partially back the palette binding, but for most controls, only when inherit of their attached theme property is true (which is not default) as the application of color is not perfect (this is due to incompatibilities between QPalette api and the horrible KColorScheme api, wonder if it can be corrected in kf6 to play a bit nicer) checkboxes still not apply the palette, so there is no risk of 406295 happening again and in general by default everything doesn't look with altered colors, but one has to "want" it by setting inherit M +1 -0 org.kde.desktop/Button.qml M +1 -0 org.kde.desktop/ComboBox.qml M +1 -0 org.kde.desktop/DelayButton.qml M +1 -0 org.kde.desktop/Dial.qml M +2 -0 org.kde.desktop/ProgressBar.qml M +1 -0 org.kde.desktop/RoundButton.qml M +2 -0 org.kde.desktop/ScrollBar.qml M +2 -0 org.kde.desktop/SpinBox.qml M +1 -0 org.kde.desktop/TabBar.qml M +4 -0 org.kde.desktop/TabButton.qml M +1 -0 org.kde.desktop/TextArea.qml M +1 -0 org.kde.desktop/TextField.qml M +1 -0 org.kde.desktop/ToolButton.qml M +1 -0 org.kde.desktop/ToolTip.qml https://invent.kde.org/frameworks/qqc2-desktop-style/commit/55f5eb707b17d47bd3e776f803f1656ff5ff2e47 Git commit 03da9da594de0cbf2aa74b68c4a213b2755c5529 by Marco Martin. Committed on 07/02/2023 at 09:10. Pushed by mart into branch 'master'. use again the palette coming from Kirigami.Theme It's supposed to be possible to change "color set" of controls by setting their inherit flag to false, but at some point that got broken in commit 939176f4a556ed3 as a fix to bug 406295 but this caused bug 465054 bring partially back the palette binding, but for most controls, only when inherit of their attached theme property is true (which is not default) as the application of color is not perfect (this is due to incompatibilities between QPalette api and the horrible KColorScheme api, wonder if it can be corrected in kf6 to play a bit nicer) checkboxes still not apply the palette, so there is no risk of 406295 happening again and in general by default everything doesn't look with altered colors, but one has to "want" it by setting inherit M +1 -0 org.kde.desktop/Button.qml M +1 -0 org.kde.desktop/ComboBox.qml M +1 -0 org.kde.desktop/DelayButton.qml M +1 -0 org.kde.desktop/Dial.qml M +2 -0 org.kde.desktop/ProgressBar.qml M +1 -0 org.kde.desktop/RoundButton.qml M +2 -0 org.kde.desktop/ScrollBar.qml M +2 -0 org.kde.desktop/SpinBox.qml M +1 -0 org.kde.desktop/TabBar.qml M +4 -0 org.kde.desktop/TabButton.qml M +1 -0 org.kde.desktop/TextArea.qml M +1 -0 org.kde.desktop/TextField.qml M +1 -0 org.kde.desktop/ToolButton.qml M +1 -0 org.kde.desktop/ToolTip.qml https://invent.kde.org/frameworks/qqc2-desktop-style/commit/03da9da594de0cbf2aa74b68c4a213b2755c5529 A possibly relevant merge request was started @ https://invent.kde.org/frameworks/qqc2-desktop-style/-/merge_requests/232 Git commit 84f0a295b9aaa7c2b37e2b3f4677a7a5aee31818 by ivan tkachenko. Committed on 17/02/2023 at 09:24. Pushed by ratijas into branch 'master'. Revert "use again the palette coming from Kirigami.Theme" This reverts commit 03da9da594de0cbf2aa74b68c4a213b2755c5529. It doesn't work in Qt6, because they broke import versions compatibility for the palette property in, which was uplifted to QQuickItem and marked as "since 6.0", even though it was available in controls since QQC 2.3 (Qt 5.10). Simply removing import versions does not help either, as the whole thing just crashes deep inside QtQuick runtime, which is because they changed palette type from QPalette to QtQuick's own private thing, and they somehow fail to covert between each other. M +0 -1 org.kde.desktop/Button.qml M +0 -1 org.kde.desktop/ComboBox.qml M +0 -1 org.kde.desktop/DelayButton.qml M +0 -1 org.kde.desktop/Dial.qml M +0 -2 org.kde.desktop/ProgressBar.qml M +0 -1 org.kde.desktop/RoundButton.qml M +0 -2 org.kde.desktop/ScrollBar.qml M +0 -2 org.kde.desktop/SpinBox.qml M +0 -1 org.kde.desktop/TabBar.qml M +0 -4 org.kde.desktop/TabButton.qml M +0 -1 org.kde.desktop/TextArea.qml M +0 -1 org.kde.desktop/TextField.qml M +0 -1 org.kde.desktop/ToolButton.qml M +0 -1 org.kde.desktop/ToolTip.qml https://invent.kde.org/frameworks/qqc2-desktop-style/commit/84f0a295b9aaa7c2b37e2b3f4677a7a5aee31818 Git commit 3080f5edef27d19641da6ad9e0eabbe77ffa0f08 by ivan tkachenko. Committed on 27/03/2023 at 19:00. Pushed by ratijas into branch 'master'. tests: Skip palette test This is temporary, because Kirigami.Theme.palette is still broken in Qt6. M +1 -0 autotests/tst_theme.qml https://invent.kde.org/frameworks/kirigami/commit/3080f5edef27d19641da6ad9e0eabbe77ffa0f08 Remember to un-skip the tests when re-applying the fix for KF6. https://invent.kde.org/frameworks/kirigami/-/merge_requests/1005 |