From 275b1f726953164a3cfb0df1a55365a70b172b2a Mon Sep 17 00:00:00 2001 From: Laurent Date: Fri, 27 Jan 2023 12:16:01 +0100 Subject: [PATCH] Use monospaced font for the timer --- LeCountdown/Views/ContentView.swift | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/LeCountdown/Views/ContentView.swift b/LeCountdown/Views/ContentView.swift index 36af678..f392c01 100644 --- a/LeCountdown/Views/ContentView.swift +++ b/LeCountdown/Views/ContentView.swift @@ -18,7 +18,7 @@ struct CountdownLiveView: View { VStack { Text(countdown.activity?.name ?? "") if let dateInterval = environment.notificationDates[countdown.stringId] { - Text(dateInterval.end, style: .timer) + Text(dateInterval.end, style: .timer).monospaced() Button { CountdownScheduler.master.cancelCurrentNotifications(countdown: countdown) } label: { @@ -26,7 +26,7 @@ struct CountdownLiveView: View { } } else { - Text(countdown.duration.minuteSecond) + Text(countdown.duration.minuteSecond).monospaced() } } .font(.title2) @@ -205,13 +205,6 @@ fileprivate extension Countdown { } -//private let itemFormatter: DateFormatter = { -// let formatter = DateFormatter() -// formatter.dateStyle = .short -// formatter.timeStyle = .medium -// return formatter -//}() - struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView().environment(\.managedObjectContext, PersistenceController.preview.container.viewContext)