visual improvements

release
Laurent 3 years ago
parent 0e311d6134
commit 426f54cf08
  1. 24
      LeCountdown/Views/LiveTimerListView.swift
  2. 5
      LeCountdown/Views/PresetsView.swift

@ -26,7 +26,8 @@ struct SeparatorView: View {
var body: some View {
Spacer()
.frame(minWidth: 0.0, maxWidth: .infinity, minHeight: 1.0, maxHeight: 1.0)
.background(.gray)
.background(Color(white: 0.85))
.padding(.vertical, 8.0)
}
}
@ -130,28 +131,14 @@ struct LiveCountdownView: View {
var date: Date
var body: some View {
// Spacer()
TimelineView(.periodic(from: self.date, by: 0.01)) { context in
VStack(alignment: .trailing) {
let running = self.date > context.date
if running {
HStack {
TimeView(text: self._formattedDuration(date: context.date))
// .padding(.trailing)
// Button {
// self._cancelCountdown()
// } label: {
// Image(systemName: "xmark.circle.fill")
// .font(.title)
// .foregroundColor(.white)
// .cornerRadius(8.0)
// .frame(minWidth: 0.0, maxWidth: 60.0, minHeight: 0.0, maxHeight: .infinity)
// }.background(.red)
}
TimeView(text: self._formattedDuration(date: context.date))
} else {
TimeView(text: self.date.formatted(date: .omitted, time: .shortened))
}
@ -160,7 +147,8 @@ struct LiveCountdownView: View {
if !running {
GreenCheckmarkView()
}
Text(self.countdown.displayName.uppercased()).padding(.top, 2.0)
Text(self.countdown.displayName.uppercased())
// .padding(.top, 2.0)
}
}

@ -195,10 +195,11 @@ struct PresetsView: View {
Spacer()
}.frame(height: 40.0)
SeparatorView()
Text("You can ask Siri to create and launch countdowns and stopwatches")
.font(.callout)
.padding(.vertical)
SeparatorView()
Text("Presets")
.font(.system(.title, weight: .heavy))

Loading…
Cancel
Save