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