From 9949ac073f68d210e43b0e3920ef10d38833a005 Mon Sep 17 00:00:00 2001 From: JRoberts <8711996+jr-simplex@users.noreply.github.com> Date: Mon, 28 Nov 2022 12:50:05 +0400 Subject: [PATCH] ios: decrease voice message progress bar width (#1450) Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> --- apps/ios/Shared/Views/Chat/ChatItem/CIVoiceView.swift | 4 ++-- .../Shared/Views/Chat/ComposeMessage/ComposeVoiceView.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/ios/Shared/Views/Chat/ChatItem/CIVoiceView.swift b/apps/ios/Shared/Views/Chat/ChatItem/CIVoiceView.swift index f99ac40ee0..e7b2b2ad63 100644 --- a/apps/ios/Shared/Views/Chat/ChatItem/CIVoiceView.swift +++ b/apps/ios/Shared/Views/Chat/ChatItem/CIVoiceView.swift @@ -162,7 +162,7 @@ struct VoiceMessagePlayer: View { .clipShape(Circle()) if recordingTime > 0 { ProgressCircle(length: recordingTime, progress: $playbackTime) - .frame(width: 52, height: 52) // this + ProgressCircle lineWidth = background circle diameter + .frame(width: 53, height: 53) // this + ProgressCircle lineWidth = background circle diameter } } } @@ -176,7 +176,7 @@ struct VoiceMessagePlayer: View { .trim(from: 0, to: ((progress ?? TimeInterval(0)) / length)) .stroke( Color.accentColor, - style: StrokeStyle(lineWidth: 4) + style: StrokeStyle(lineWidth: 3) ) .rotationEffect(.degrees(-90)) .animation(.linear, value: progress) diff --git a/apps/ios/Shared/Views/Chat/ComposeMessage/ComposeVoiceView.swift b/apps/ios/Shared/Views/Chat/ComposeMessage/ComposeVoiceView.swift index e79de0d637..637083d9f1 100644 --- a/apps/ios/Shared/Views/Chat/ComposeMessage/ComposeVoiceView.swift +++ b/apps/ios/Shared/Views/Chat/ComposeMessage/ComposeVoiceView.swift @@ -152,7 +152,7 @@ struct ComposeVoiceView: View { ZStack { Rectangle() .fill(Color.accentColor) - .frame(width: min(CGFloat((progress ?? TimeInterval(0)) / length) * geometry.size.width, geometry.size.width), height: 4) + .frame(width: min(CGFloat((progress ?? TimeInterval(0)) / length) * geometry.size.width, geometry.size.width), height: 3) .animation(.linear, value: progress) } .frame(height: ComposeVoiceView.previewHeight - 1, alignment: .bottom) // minus 1 is for the bottom padding