From 37849d141491969a618a07b9ad000b03ce51d8a5 Mon Sep 17 00:00:00 2001 From: Josh Cook Date: Mon, 9 Nov 2020 06:22:54 -0500 Subject: [PATCH 1/4] style: larger spinner offset to only show left half --- Workout Spinner WatchKit App/Info.plist | 2 +- Workout Spinner WatchKit Extension/Info.plist | 2 +- .../Views/ExercisePicker.swift | 7 ++++--- .../Views/Spinner Subviews/WorkoutSlice.swift | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Workout Spinner WatchKit App/Info.plist b/Workout Spinner WatchKit App/Info.plist index 5ebc313..3979bdf 100644 --- a/Workout Spinner WatchKit App/Info.plist +++ b/Workout Spinner WatchKit App/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 1.0 CFBundleVersion - 161 + 177 UISupportedInterfaceOrientations UIInterfaceOrientationPortrait diff --git a/Workout Spinner WatchKit Extension/Info.plist b/Workout Spinner WatchKit Extension/Info.plist index 6f5fecf..f6e58af 100644 --- a/Workout Spinner WatchKit Extension/Info.plist +++ b/Workout Spinner WatchKit Extension/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 1.0 CFBundleVersion - 161 + 177 CLKComplicationPrincipalClass $(PRODUCT_MODULE_NAME).ComplicationController CLKComplicationSupportedFamilies diff --git a/Workout Spinner WatchKit Extension/Views/ExercisePicker.swift b/Workout Spinner WatchKit Extension/Views/ExercisePicker.swift index 3697aa8..a4824f8 100644 --- a/Workout Spinner WatchKit Extension/Views/ExercisePicker.swift +++ b/Workout Spinner WatchKit Extension/Views/ExercisePicker.swift @@ -42,13 +42,13 @@ struct ExercisePicker: View { ForEach(0.. Date: Mon, 9 Nov 2020 06:41:06 -0500 Subject: [PATCH 2/4] style: blurred bars at the top and bottom of the spinner --- Workout Spinner WatchKit App/Info.plist | 2 +- Workout Spinner WatchKit Extension/Info.plist | 2 +- .../Views/ExercisePicker.swift | 82 ++++++++++++------- 3 files changed, 56 insertions(+), 30 deletions(-) diff --git a/Workout Spinner WatchKit App/Info.plist b/Workout Spinner WatchKit App/Info.plist index 3979bdf..70dbf82 100644 --- a/Workout Spinner WatchKit App/Info.plist +++ b/Workout Spinner WatchKit App/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 1.0 CFBundleVersion - 177 + 189 UISupportedInterfaceOrientations UIInterfaceOrientationPortrait diff --git a/Workout Spinner WatchKit Extension/Info.plist b/Workout Spinner WatchKit Extension/Info.plist index f6e58af..c8784a1 100644 --- a/Workout Spinner WatchKit Extension/Info.plist +++ b/Workout Spinner WatchKit Extension/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 1.0 CFBundleVersion - 177 + 189 CLKComplicationPrincipalClass $(PRODUCT_MODULE_NAME).ComplicationController CLKComplicationSupportedFamilies diff --git a/Workout Spinner WatchKit Extension/Views/ExercisePicker.swift b/Workout Spinner WatchKit Extension/Views/ExercisePicker.swift index a4824f8..4e377c1 100644 --- a/Workout Spinner WatchKit Extension/Views/ExercisePicker.swift +++ b/Workout Spinner WatchKit Extension/Views/ExercisePicker.swift @@ -34,46 +34,72 @@ struct ExercisePicker: View { } var body: some View { - VStack(spacing: 0) { - Spacer(minLength: 0) - GeometryReader { geo in - ZStack { + ZStack { + VStack(spacing: 0) { + Spacer(minLength: 0) + GeometryReader { geo in ZStack { - ForEach(0.. Date: Mon, 9 Nov 2020 06:41:32 -0500 Subject: [PATCH 3/4] style: flip text to be right-side-up in the viewable portion of the spinner --- .../Views/Spinner Subviews/WorkoutSlice.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Workout Spinner WatchKit Extension/Views/Spinner Subviews/WorkoutSlice.swift b/Workout Spinner WatchKit Extension/Views/Spinner Subviews/WorkoutSlice.swift index c124227..e5bd662 100644 --- a/Workout Spinner WatchKit Extension/Views/Spinner Subviews/WorkoutSlice.swift +++ b/Workout Spinner WatchKit Extension/Views/Spinner Subviews/WorkoutSlice.swift @@ -26,6 +26,7 @@ struct WorkoutSlice: View { var body: some View { Text(workoutInfo.displayName) + .rotationEffect(.degrees(180)) .font(.system(size: 20)) .foregroundColor(.black) .lineLimit(1) From a90cbfa8e4ba9341aeffd53cbc9b93602a5012b5 Mon Sep 17 00:00:00 2001 From: Josh Cook Date: Mon, 9 Nov 2020 07:05:01 -0500 Subject: [PATCH 4/4] style: remove random colors from spinner and give stroke and background --- Workout Spinner WatchKit App/Info.plist | 2 +- Workout Spinner WatchKit Extension/Info.plist | 2 +- .../Views/Spinner Subviews/SpinnerSlice.swift | 6 ++++-- .../Views/Spinner Subviews/WorkoutSlice.swift | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Workout Spinner WatchKit App/Info.plist b/Workout Spinner WatchKit App/Info.plist index 70dbf82..c3590cd 100644 --- a/Workout Spinner WatchKit App/Info.plist +++ b/Workout Spinner WatchKit App/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 1.0 CFBundleVersion - 189 + 199 UISupportedInterfaceOrientations UIInterfaceOrientationPortrait diff --git a/Workout Spinner WatchKit Extension/Info.plist b/Workout Spinner WatchKit Extension/Info.plist index c8784a1..03bced6 100644 --- a/Workout Spinner WatchKit Extension/Info.plist +++ b/Workout Spinner WatchKit Extension/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 1.0 CFBundleVersion - 189 + 199 CLKComplicationPrincipalClass $(PRODUCT_MODULE_NAME).ComplicationController CLKComplicationSupportedFamilies diff --git a/Workout Spinner WatchKit Extension/Views/Spinner Subviews/SpinnerSlice.swift b/Workout Spinner WatchKit Extension/Views/Spinner Subviews/SpinnerSlice.swift index 305d504..4d6c9cb 100644 --- a/Workout Spinner WatchKit Extension/Views/Spinner Subviews/SpinnerSlice.swift +++ b/Workout Spinner WatchKit Extension/Views/Spinner Subviews/SpinnerSlice.swift @@ -42,11 +42,13 @@ struct SpinnerSlice: View { var body: some View { ZStack { + Color.darkGray + .clipShape(SpinnerSliceShape(radius: width / 2.0, angle: sliceAngle)) SpinnerSliceShape(radius: width / 2.0, angle: sliceAngle) + .stroke(Color.gray, lineWidth: 3) .frame(width: width, height: width) - .foregroundColor(Color.randomPastelColor()) - .rotationEffect(rotationAngle) } + .rotationEffect(rotationAngle) } } diff --git a/Workout Spinner WatchKit Extension/Views/Spinner Subviews/WorkoutSlice.swift b/Workout Spinner WatchKit Extension/Views/Spinner Subviews/WorkoutSlice.swift index e5bd662..932a6b9 100644 --- a/Workout Spinner WatchKit Extension/Views/Spinner Subviews/WorkoutSlice.swift +++ b/Workout Spinner WatchKit Extension/Views/Spinner Subviews/WorkoutSlice.swift @@ -28,7 +28,7 @@ struct WorkoutSlice: View { Text(workoutInfo.displayName) .rotationEffect(.degrees(180)) .font(.system(size: 20)) - .foregroundColor(.black) + .foregroundColor(.white) .lineLimit(1) .padding(.horizontal, 5) .frame(width: size / 2 - offset, height: nil, alignment: .trailing)