Updated the RecordingButtonStyle button style in the Recording feature target to tint the round background color.

This commit is contained in:
2026-07-07 00:38:07 +02:00
parent dfd4829980
commit f463c60b35
5 changed files with 99 additions and 61 deletions
@@ -7,7 +7,8 @@ import SwiftUI
/// A view that drives a recording session.
///
/// The view shows a main button that starts, pauses, and resumes a recording, with a label above it displaying the elapsed recording time.
/// While paused, a send button lets the user submit the recording for processing, showing a progress indicator until the processing finishes.
/// While paused, a discard button throws the recording away and a send button submits it for processing the send button showing a
/// progress indicator until the processing finishes.
///
/// All state and control behavior lives in the view's ``Model``; the view itself only renders it and forwards button presses.
public struct RecordingView: View {
@@ -92,7 +93,7 @@ public struct RecordingView: View {
.resizable()
}
.buttonStyle(.recording(
invertStyle: true
tintColor: .red
))
.accessibilityLabel(.viewRecordingButtonDiscardLabel)
}
@@ -104,7 +105,7 @@ public struct RecordingView: View {
.resizable()
}
.buttonStyle(.recording(
invertStyle: true
tintColor: .yellow
))
.disabled(model.shouldDisableMain)
.accessibilityLabel(model.labelMain)
@@ -121,7 +122,7 @@ public struct RecordingView: View {
}
}
.buttonStyle(.recording(
invertStyle: !model.isProcessing
tintColor: .green
))
.disabled(model.isProcessing)
.accessibilityLabel(model.labelSend)
@@ -177,7 +178,7 @@ public struct RecordingView: View {
/// The constant values used across the view.
private enum Constant {
/// The spacing constants.
/// The size constants.
enum Size {
/// The font size of the timer label.
static let timer: CGFloat = 100