pass color and rotation

This commit is contained in:
Benjamin Palko 2025-08-29 15:58:28 -04:00
parent 24f932f8d1
commit c5ac7fe773

View file

@ -11,6 +11,8 @@ RoundButton {
} }
property alias border: rect.border property alias border: rect.border
property color color: hovered ? Theme.palette.primarycontent : Theme.palette.basecontent
property int rotation: 0
font.family: loader.font.family font.family: loader.font.family
font.pixelSize: 18 font.pixelSize: 18
@ -22,14 +24,22 @@ RoundButton {
} }
contentItem: Text { contentItem: Text {
id: icon
font: control.font font: control.font
text: control.text text: control.text
color: control.hovered ? Theme.palette.primarycontent : Theme.palette.basecontent color: control.color
Behavior on color { Behavior on color {
ColorAnimation { ColorAnimation {
duration: 100 duration: 100
} }
} }
rotation: control.rotation
Behavior on rotation {
RotationAnimation {
duration: 200
easing.type: Easing.InOutCubic
}
}
} }
background: Rectangle { background: Rectangle {