From ede42620af1f46ead69ccca327237b68f94db73d Mon Sep 17 00:00:00 2001 From: zhengyk <53221608+zyk1172@users.noreply.github.com> Date: Fri, 2 Oct 2026 05:41:21 +0800 Subject: [PATCH] Strengthen translation bubble pulse visibility --- mreader/ReaderView.swift | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/mreader/ReaderView.swift b/mreader/ReaderView.swift index 6d4296d5..c8cb90a5 100644 --- a/mreader/ReaderView.swift +++ b/mreader/ReaderView.swift @@ -8096,10 +8096,12 @@ private struct TranslationProgressPulseStroke: View { let contour: [CGPoint] @Environment(\.accessibilityReduceMotion) private var reduceMotion + private let progressColor = Color(red: 0.12, green: 0.58, blue: 1.0) + var body: some View { Group { if reduceMotion { - stroke(opacity: 0.24, lineWidth: 1.1) + stroke(opacity: 0.56, lineWidth: 1.35) } else { TimelineView(.periodic(from: .now, by: 1.0 / 12.0)) { context in let duration: TimeInterval = 1.9 @@ -8107,8 +8109,8 @@ private struct TranslationProgressPulseStroke: View { .truncatingRemainder(dividingBy: duration) / duration let pulse = phase <= 0.5 ? phase * 2 : (1 - phase) * 2 stroke( - opacity: 0.16 + pulse * 0.18, - lineWidth: 1.0 + CGFloat(pulse) * 0.25 + opacity: 0.38 + pulse * 0.32, + lineWidth: 1.25 + CGFloat(pulse) * 0.40 ) } } @@ -8121,22 +8123,30 @@ private struct TranslationProgressPulseStroke: View { if contour.count >= 3 { TranslationBubbleContourShape(points: contour) .stroke( - Color.secondary.opacity(opacity), + progressColor.opacity(opacity), style: StrokeStyle( lineWidth: lineWidth, lineCap: .round, lineJoin: .round ) ) + .shadow( + color: progressColor.opacity(opacity * 0.32), + radius: 1.8 + ) } else { RoundedRectangle( cornerRadius: max(min(layoutSize.width, layoutSize.height) * 0.12, 4), style: .continuous ) .stroke( - Color.secondary.opacity(opacity), + progressColor.opacity(opacity), lineWidth: lineWidth ) + .shadow( + color: progressColor.opacity(opacity * 0.32), + radius: 1.8 + ) } } }