Commit c9582182 authored by Tanbir Jishan's avatar Tanbir Jishan Committed by Nate Graham
Browse files

kcms/colors: add hover effect to custom accent color buttons

In general, our UI controls have hover effects, so let's do the same
here for these custom ones.
parent 73bfdcff
Pipeline #205733 passed with stage
in 11 minutes and 1 second
......@@ -193,11 +193,17 @@ KCM.GridViewKCM {
implicitHeight: Math.round(Kirigami.Units.gridUnit * 1.25)
background: Rectangle {
readonly property bool showHighlight: parent.hovered && !control.checked && !Qt.colorEqual(control.color, "transparent")
color: control.color
radius: height / 2
radius: showHighlight ? Math.round(height / 4) : Math.round(height / 2)
border {
color: Qt.rgba(0, 0, 0, 0.15)
width: control.visualFocus ? 2 : 0
color: showHighlight ? Kirigami.Theme.highlightColor : Qt.rgba(0, 0, 0, 0.15)
}
Behavior on radius {
PropertyAnimation {
duration: Kirigami.Units.veryShortDuration
from: Math.round(height / 2)
}
}
}
indicator: Rectangle {
......
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