Skip to content

Commit

Permalink
Fix disabled toolbar icons not getting grayed out in Qt 6
Browse files Browse the repository at this point in the history
Fix #276
  • Loading branch information
Cuperino committed Sep 21, 2024
1 parent 86b06f0 commit 9931a91
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/kirigami_ui/EditorToolbar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9931a91

Please sign in to comment.