make buttons ripple

This commit is contained in:
end-4
2025-05-22 19:01:20 +02:00
parent 042a4d1c24
commit 927487c60f
26 changed files with 305 additions and 400 deletions
@@ -81,11 +81,12 @@ Scope { // Scope
}
}
Button { // Close button
RippleButton { // Close button
id: closeButton
focus: cheatsheetRoot.visible
implicitWidth: 40
implicitHeight: 40
buttonRadius: Appearance.rounding.full
anchors {
top: parent.top
right: parent.right
@@ -93,28 +94,15 @@ Scope { // Scope
rightMargin: 20
}
PointingHandInteraction {}
onClicked: {
cheatsheetRoot.hide()
}
background: null
contentItem: Rectangle {
anchors.fill: parent
radius: Appearance.rounding.full
color: closeButton.pressed ? Appearance.colors.colLayer0Active :
closeButton.hovered ? Appearance.colors.colLayer0Hover :
ColorUtils.transparentize(Appearance.colors.colLayer0, 1)
Behavior on color {
animation: Appearance.animation.elementMoveFast.colorAnimation.createObject(this)
}
MaterialSymbol {
anchors.centerIn: parent
font.pixelSize: Appearance.font.pixelSize.title
text: "close"
}
contentItem: MaterialSymbol {
anchors.centerIn: parent
horizontalAlignment: Text.AlignHCenter
font.pixelSize: Appearance.font.pixelSize.title
text: "close"
}
}