Fixed the size of the timer label for the ContentView view in the Sample app target.
This commit is contained in:
@@ -13,6 +13,9 @@ public struct RecordingView: View {
|
||||
/// The model that owns the recording state and drives the view's controls.
|
||||
@State private var model: Model
|
||||
|
||||
/// The font size of the timer's label, scaled relative to the current dynamic type size.
|
||||
@ScaledMetric private var fontSize = Constant.Size.timer
|
||||
|
||||
/// The closure invoked with the transcription of every processed recording.
|
||||
private let onTranscription: (Transcription) -> Void
|
||||
|
||||
@@ -49,7 +52,7 @@ public struct RecordingView: View {
|
||||
) {
|
||||
if model.shouldShowTimer {
|
||||
Text(model.textTimer)
|
||||
.font(.largeTitle)
|
||||
.font(.system(size: fontSize))
|
||||
.fontWeight(.bold)
|
||||
.foregroundStyle(.primary)
|
||||
.monospacedDigit()
|
||||
@@ -119,6 +122,11 @@ public struct RecordingView: View {
|
||||
|
||||
/// The constant values used across the view.
|
||||
private enum Constant {
|
||||
/// The spacing constants.
|
||||
enum Size {
|
||||
/// The font size of the timer label.
|
||||
static let timer: CGFloat = 100
|
||||
}
|
||||
/// The spacing constants.
|
||||
enum Spacing {
|
||||
/// The spacing between the elements of a stack.
|
||||
|
||||
Reference in New Issue
Block a user