Commit d80c79f2 authored by Noah Davis's avatar Noah Davis 🌵
Browse files

[CheckIndicator] Don't highlight background on press if in a CheckDelegate

parent 40c41066
......@@ -16,7 +16,7 @@ Rectangle {
property bool mirrored: control.mirrored
readonly property bool controlHasContent: control.contentItem && control.contentItem.width > 0
property bool highlightBackground: control.down || root.checkState !== Qt.Unchecked
property bool highlightBackground: root.checkState !== Qt.Unchecked || (control.down && !(control instanceof T.CheckDelegate))
property bool highlightBorder: control.down || root.checkState !== Qt.Unchecked || control.highlighted || control.visualFocus || control.hovered
visible: control.checkable
......@@ -29,13 +29,13 @@ Rectangle {
Kirigami.Theme.colorSet: Kirigami.Theme.Button
Kirigami.Theme.inherit: false
color: (control.down || root.checkState !== Qt.Unchecked) ? Kirigami.Theme.alternateBackgroundColor : Kirigami.Theme.backgroundColor
color: highlightBackground ? Kirigami.Theme.alternateBackgroundColor : Kirigami.Theme.backgroundColor
radius: Kirigami.Units.smallRadius
border {
width: Kirigami.Units.smallBorder
color: control.down || root.checkState !== Qt.Unchecked || control.highlighted || control.visualFocus || control.hovered ?
color: highlightBorder ?
Kirigami.Theme.focusColor : Kirigami.Theme.separatorColor
//Kirigami.ColorUtils.tintWithAlpha(root.color, Kirigami.Theme.textColor, 0.3)
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment