From d76d1c628afb6193191390c9c82ea75f99464f5f Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Tue, 9 Sep 2025 08:56:30 -0400 Subject: [PATCH] NIconButton: animation on color (bg+fg) --- Widgets/NIconButton.qml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Widgets/NIconButton.qml b/Widgets/NIconButton.qml index e5576ed..296279e 100644 --- a/Widgets/NIconButton.qml +++ b/Widgets/NIconButton.qml @@ -38,6 +38,13 @@ Rectangle { border.color: root.enabled && root.hovering ? colorBorderHover : colorBorder border.width: Math.max(1, Style.borderS * scaling) + Behavior on color { + ColorAnimation { + duration: Style.animationNormal + easing.type: Easing.InOutQuad + } + } + NIcon { icon: root.icon font.pointSize: Math.max(1, root.width * 0.4) @@ -46,6 +53,13 @@ Rectangle { x: (root.width - width) / 2 // Center vertically accounting for font metrics y: (root.height - height) / 2 + (height - contentHeight) / 2 + + Behavior on color { + ColorAnimation { + duration: Style.animationFast + easing.type: Easing.InOutQuad + } + } } NTooltip {