From cb206a18c28965cf37119a0c834a69f6336cf921 Mon Sep 17 00:00:00 2001 From: Max Goedjen Date: Tue, 18 Jan 2022 16:24:57 -0500 Subject: [PATCH] Switch (#334) --- Sources/Secretive/Views/SetupView.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/Secretive/Views/SetupView.swift b/Sources/Secretive/Views/SetupView.swift index 9329608..90f1896 100644 --- a/Sources/Secretive/Views/SetupView.swift +++ b/Sources/Secretive/Views/SetupView.swift @@ -22,7 +22,7 @@ struct SetupView: View { } .frame(width: proxy.size.width) } - .offset(x: -proxy.size.width * CGFloat(stepIndex), y: 0) + .offset(x: -proxy.size.width * Double(stepIndex), y: 0) } } } @@ -44,7 +44,7 @@ struct StepView: View { let currentStep: Int // Ideally we'd have a geometry reader inside this view doing this for us, but that crashes on 11.0b7 - let width: CGFloat + let width: Double var body: some View { ZStack(alignment: .leading) { @@ -53,7 +53,7 @@ struct StepView: View { .frame(height: 5) Rectangle() .foregroundColor(.green) - .frame(width: max(0, ((width - (Constants.padding * 2)) / CGFloat(numberOfSteps - 1)) * CGFloat(currentStep) - (Constants.circleWidth / 2)), height: 5) + .frame(width: max(0, ((width - (Constants.padding * 2)) / Double(numberOfSteps - 1)) * Double(currentStep) - (Constants.circleWidth / 2)), height: 5) HStack { ForEach(0..