visual improvements

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

@ -26,7 +26,8 @@ struct SeparatorView: View {
var body: some View { var body: some View {
Spacer() Spacer()
.frame(minWidth: 0.0, maxWidth: .infinity, minHeight: 1.0, maxHeight: 1.0) .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 date: Date
var body: some View { var body: some View {
// Spacer()
TimelineView(.periodic(from: self.date, by: 0.01)) { context in TimelineView(.periodic(from: self.date, by: 0.01)) { context in
VStack(alignment: .trailing) { VStack(alignment: .trailing) {
let running = self.date > context.date let running = self.date > context.date
if running { if running {
TimeView(text: self._formattedDuration(date: context.date))
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)
}
} else { } else {
TimeView(text: self.date.formatted(date: .omitted, time: .shortened)) TimeView(text: self.date.formatted(date: .omitted, time: .shortened))
} }
@ -160,7 +147,8 @@ struct LiveCountdownView: View {
if !running { if !running {
GreenCheckmarkView() GreenCheckmarkView()
} }
Text(self.countdown.displayName.uppercased()).padding(.top, 2.0) Text(self.countdown.displayName.uppercased())
// .padding(.top, 2.0)
} }
} }

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

Loading…
Cancel
Save