From c5ac7fe773d989990dda1c23d8752bd71f41a6bd Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Fri, 29 Aug 2025 15:58:28 -0400 Subject: [PATCH] pass color and rotation --- components/StyledIconButton.qml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/components/StyledIconButton.qml b/components/StyledIconButton.qml index e655350..780113d 100644 --- a/components/StyledIconButton.qml +++ b/components/StyledIconButton.qml @@ -11,6 +11,8 @@ RoundButton { } 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.pixelSize: 18 @@ -22,14 +24,22 @@ RoundButton { } contentItem: Text { + id: icon font: control.font text: control.text - color: control.hovered ? Theme.palette.primarycontent : Theme.palette.basecontent + color: control.color Behavior on color { ColorAnimation { duration: 100 } } + rotation: control.rotation + Behavior on rotation { + RotationAnimation { + duration: 200 + easing.type: Easing.InOutCubic + } + } } background: Rectangle {