Improve StartView UI

main
Laurent 2 years ago
parent 69bc2abcb0
commit 6f99988130
  1. 15
      LeCountdown/Views/StartView.swift
  2. 2
      LeCountdown/fr.lproj/Localizable.strings

@ -29,7 +29,7 @@ struct StartView: View {
PresetSelectionView(model: self.model).monospaced() PresetSelectionView(model: self.model).monospaced()
HStack(spacing: 2.0) { HStack(spacing: 4.0) {
Button { Button {
self.showTimerScreen = true self.showTimerScreen = true
} label: { } label: {
@ -37,10 +37,12 @@ struct StartView: View {
Image(systemName: "timer")//.font(.title) Image(systemName: "timer")//.font(.title)
Text("Create your own timer") Text("Create your own timer")
} }
.multilineTextAlignment(.leading)
.padding() .padding()
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity, maxHeight: .infinity)
.foregroundColor(.white) .foregroundColor(.white)
.background(Color.accentColor) .background(Color.accentColor)
.cornerRadius(8.0)
}.sheet(isPresented: self.$showTimerScreen) { }.sheet(isPresented: self.$showTimerScreen) {
NewCountdownView(isPresented: $showTimerScreen) NewCountdownView(isPresented: $showTimerScreen)
.environment(\.managedObjectContext, viewContext) .environment(\.managedObjectContext, viewContext)
@ -53,15 +55,20 @@ struct StartView: View {
Image(systemName: "stopwatch")//.font(.title) Image(systemName: "stopwatch")//.font(.title)
Text("Create your own stopwatch") Text("Create your own stopwatch")
} }
.multilineTextAlignment(.leading)
.padding() .padding()
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity, maxHeight: .infinity)
.foregroundColor(.white) .foregroundColor(.white)
.background(Color.accentColor) .background(Color.accentColor)
.cornerRadius(8.0)
}.sheet(isPresented: self.$showStopwatchScreen) { }.sheet(isPresented: self.$showStopwatchScreen) {
NewStopwatchView(isPresented: $showStopwatchScreen) NewStopwatchView(isPresented: $showStopwatchScreen)
.environment(\.managedObjectContext, viewContext) .environment(\.managedObjectContext, viewContext)
} }
}.frame(maxHeight: 80.0) }
.font(.footnote)
.frame(height: 80.0)
.padding(4.0)
Button { Button {
self._done() self._done()

@ -284,3 +284,5 @@
"SelectTimer" = "Choisissez un minuteur"; "SelectTimer" = "Choisissez un minuteur";
"Launch Widget" = "Raccourcis"; "Launch Widget" = "Raccourcis";
"Select and launch your timers" = "Choisissez vos 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";

Loading…
Cancel
Save