From 6f9998813012cf508437ee16e2453e2442e34b2c Mon Sep 17 00:00:00 2001 From: Laurent Date: Thu, 22 Jun 2023 15:17:33 +0200 Subject: [PATCH] Improve StartView UI --- LeCountdown/Views/StartView.swift | 15 +++++++++++---- LeCountdown/fr.lproj/Localizable.strings | 2 ++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/LeCountdown/Views/StartView.swift b/LeCountdown/Views/StartView.swift index fed26b1..bca4b17 100644 --- a/LeCountdown/Views/StartView.swift +++ b/LeCountdown/Views/StartView.swift @@ -29,7 +29,7 @@ struct StartView: View { PresetSelectionView(model: self.model).monospaced() - HStack(spacing: 2.0) { + HStack(spacing: 4.0) { Button { self.showTimerScreen = true } label: { @@ -37,10 +37,12 @@ struct StartView: View { Image(systemName: "timer")//.font(.title) Text("Create your own timer") } + .multilineTextAlignment(.leading) .padding() - .frame(maxWidth: .infinity) + .frame(maxWidth: .infinity, maxHeight: .infinity) .foregroundColor(.white) .background(Color.accentColor) + .cornerRadius(8.0) }.sheet(isPresented: self.$showTimerScreen) { NewCountdownView(isPresented: $showTimerScreen) .environment(\.managedObjectContext, viewContext) @@ -53,15 +55,20 @@ struct StartView: View { Image(systemName: "stopwatch")//.font(.title) Text("Create your own stopwatch") } + .multilineTextAlignment(.leading) .padding() - .frame(maxWidth: .infinity) + .frame(maxWidth: .infinity, maxHeight: .infinity) .foregroundColor(.white) .background(Color.accentColor) + .cornerRadius(8.0) }.sheet(isPresented: self.$showStopwatchScreen) { NewStopwatchView(isPresented: $showStopwatchScreen) .environment(\.managedObjectContext, viewContext) } - }.frame(maxHeight: 80.0) + } + .font(.footnote) + .frame(height: 80.0) + .padding(4.0) Button { self._done() diff --git a/LeCountdown/fr.lproj/Localizable.strings b/LeCountdown/fr.lproj/Localizable.strings index ff990e9..50ff150 100644 --- a/LeCountdown/fr.lproj/Localizable.strings +++ b/LeCountdown/fr.lproj/Localizable.strings @@ -284,3 +284,5 @@ "SelectTimer" = "Choisissez un minuteur"; "Launch Widget" = "Raccourcis"; "Select and launch your timers" = "Choisissez vos raccourcis"; +"Create your own timer" = "Créer un minuteur"; +"Create your own stopwatch" = "Créer un chronomètre";