From 9931a917aa8eb998626cda68457969e513854122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20O=2E=20Cordero=20P=C3=A9rez?= Date: Sat, 21 Sep 2024 10:50:54 -0400 Subject: [PATCH] Fix disabled toolbar icons not getting grayed out in Qt 6 Fix #276 --- src/kirigami_ui/EditorToolbar.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/kirigami_ui/EditorToolbar.qml b/src/kirigami_ui/EditorToolbar.qml index bec44ca7..08a80217 100644 --- a/src/kirigami_ui/EditorToolbar.qml +++ b/src/kirigami_ui/EditorToolbar.qml @@ -164,10 +164,14 @@ ToolBar { Component { id: textComponent Text { + SystemPalette { + id: disabledButtonPalette + colorGroup: SystemPalette.Disabled + } anchors.fill: parent text: parent.parent.text font: parent.parent.font - color: parent.parent.enabled ? (parent.parent.down ? /*Kirigami.Theme.positiveTextColor*/Kirigami.Theme.focusColor : (parent.parent.checked ? Kirigami.Theme.focusColor : Kirigami.Theme.textColor)) : (root.themeIsMaterial ? "#888" : Kirigami.Theme.textColor) + color: parent.parent.enabled ? (parent.parent.down ? /*Kirigami.Theme.positiveTextColor*/Kirigami.Theme.focusColor : (parent.parent.checked ? Kirigami.Theme.focusColor : Kirigami.Theme.textColor)) : disabledButtonPalette.buttonText horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter elide: Text.ElideRight