From d463189e3976248d9c823e543026196c189bca85 Mon Sep 17 00:00:00 2001 From: JOJO <1498581755@qq.com> Date: Tue, 5 May 2026 21:47:41 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=AC=20=E6=81=A2=E5=A4=8D=E8=BF=9B?= =?UTF-8?q?=E5=BA=A6=E5=8A=A8=E7=94=BB=20(0.2s)=EF=BC=8Cvalue=E5=8F=98?= =?UTF-8?q?=E5=8C=96=E6=97=B6=E5=B9=B3=E6=BB=91=E8=BF=87=E6=B8=A1=EF=BC=8C?= =?UTF-8?q?=E5=B8=83=E5=B1=80=E5=8F=98=E5=8C=96=E6=97=B6=E7=9E=AC=E9=97=B4?= =?UTF-8?q?=E5=93=8D=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/FloatingMonitor/Views/GaugeView.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sources/FloatingMonitor/Views/GaugeView.swift b/Sources/FloatingMonitor/Views/GaugeView.swift index 30516c5..26fd686 100644 --- a/Sources/FloatingMonitor/Views/GaugeView.swift +++ b/Sources/FloatingMonitor/Views/GaugeView.swift @@ -66,6 +66,7 @@ struct StyledGauge: View { ) ) .frame(width: max(geo.size.width * CGFloat(value / 100), 4), height: 8) + .animation(.easeOut(duration: 0.2), value: value) } } .frame(height: 8) @@ -91,6 +92,7 @@ struct StyledGauge: View { Circle() .stroke(Color.white.opacity(0.12), lineWidth: 5) .frame(width: 48, height: 48) + .animation(.easeOut(duration: 0.2), value: value) Circle() .trim(from: 0, to: CGFloat(value / 100)) .stroke( @@ -127,6 +129,7 @@ struct StyledGauge: View { Text(String(format: "%.1f%@", value, unit)) .font(.system(size: fontSize + 6, weight: .bold, design: .monospaced)) .foregroundColor(gaugeColor) + .animation(.easeOut(duration: 0.2), value: value) Spacer() Text(detail) .font(.system(size: fontSize - 2)) @@ -148,6 +151,7 @@ struct StyledGauge: View { .fill(gaugeColor.opacity(0.85)) .frame(width: 42, height: 42) .clipShape(Circle()) + .animation(.easeOut(duration: 0.2), value: value) Text(String(format: "%.0f", value)) .font(.system(size: fontSize - 2, weight: .bold, design: .monospaced)) @@ -178,6 +182,7 @@ struct StyledGauge: View { RoundedRectangle(cornerRadius: 4) .fill(gaugeColor) .frame(width: max(geo.size.width * CGFloat(value / 100), 3), height: 14) + .animation(.easeOut(duration: 0.2), value: value) } } .frame(height: 14)