diff --git a/StudyApplication/Engagements/DailyStepCountGoal/DailyStepCountGoal.swift b/StudyApplication/Engagements/DailyStepCountGoal/DailyStepCountGoal.swift index ac05e1b..3f133f3 100644 --- a/StudyApplication/Engagements/DailyStepCountGoal/DailyStepCountGoal.swift +++ b/StudyApplication/Engagements/DailyStepCountGoal/DailyStepCountGoal.swift @@ -43,7 +43,7 @@ struct DailyStepCountGoal: View { } .padding(.horizontal, 20) } - .frame(minHeight: 140, idealHeight: 160, maxHeight: 200) + .frame(minHeight: 140, idealHeight: 180, maxHeight: 200) .padding() .padding(.horizontal, 32) } diff --git a/StudyApplication/Engagements/DailyStepCountGoal/Gauge.swift b/StudyApplication/Engagements/DailyStepCountGoal/Gauge.swift index c1b5c8e..fd8def4 100644 --- a/StudyApplication/Engagements/DailyStepCountGoal/Gauge.swift +++ b/StudyApplication/Engagements/DailyStepCountGoal/Gauge.swift @@ -81,19 +81,18 @@ struct Gauge: View { style: StrokeStyle(lineWidth: 20, lineCap: .round) ) .rotationEffect(.degrees(-90)) - .frame(width: size.width, height: size.height) .padding(lineWidth / 2) if progress < 1.0 - (lineWidth / (2 * radius * .pi)) { Circle() .frame(width: lineWidth) .foregroundColor(gradient.stops.first?.color) - .offset(y: -(size.height / 2)) + .offset(y: -(size.height / 2) + (lineWidth / 2)) } else { let shaddowOffset = shaddowOffset Circle() .frame(width: lineWidth) .foregroundColor(gradient.stops.last?.color) - .offset(y: -(size.height / 2)) + .offset(y: -(size.height / 2) + (lineWidth / 2)) .rotationEffect(Angle.degrees(360 * Double(progress))) .shadow( color: .black.opacity(0.2), diff --git a/StudyApplication/SharedContext/StudyApplicationListCard.swift b/StudyApplication/SharedContext/StudyApplicationListCard.swift index 28537ba..9dc4988 100644 --- a/StudyApplication/SharedContext/StudyApplicationListCard.swift +++ b/StudyApplication/SharedContext/StudyApplicationListCard.swift @@ -10,6 +10,8 @@ import SwiftUI struct StudyApplicationListCard: View { + @Environment(\.colorScheme) var colorScheme + var content: () -> Content @@ -18,7 +20,7 @@ struct StudyApplicationListCard: View { .padding(.horizontal, 16) .padding(.vertical, 8) .background { - Color(uiColor: .systemBackground) + Color(uiColor: colorScheme == .light ? .systemBackground : .secondarySystemBackground) .ignoresSafeArea() } .clipShape(RoundedRectangle(cornerRadius: 10.0)) diff --git a/StudyApplication/Studies/VascTrac/VascTracStudy.swift b/StudyApplication/Studies/VascTrac/VascTracStudy.swift index 955b7ae..a35da19 100644 --- a/StudyApplication/Studies/VascTrac/VascTracStudy.swift +++ b/StudyApplication/Studies/VascTrac/VascTracStudy.swift @@ -56,21 +56,18 @@ extension Study { task(forQuestionnaire: padWalkingImpairmentQuestionnaire, title: "PAD Walking Impairment", week: 6), task(forQuestionnaire: peripheralArteryQuestionnaire, title: "Peripheral Artery Questionnaire (PAQ)", week: 6), task(forQuestionnaire: phq9DepressionQuestionnaire, title: "PHQ-9 Depression", week: 6), - task(forQuestionnaire: physicalActivityQuestionnaire, title: "Physical Activity Questionnaire", week: 6), task(forQuestionnaire: ahaLE8Questionnaire, title: "AHA LE8", week: 14), task(forQuestionnaire: berlinQuestionnaire, title: "Berlin", week: 14), task(forQuestionnaire: exerciseBenefitsBarriersQuestionnaire, title: "Exercise Benefits Barriers", week: 14), task(forQuestionnaire: padWalkingImpairmentQuestionnaire, title: "PAD Walking Impairment", week: 14), task(forQuestionnaire: peripheralArteryQuestionnaire, title: "Peripheral Artery Questionnaire (PAQ)", week: 14), task(forQuestionnaire: phq9DepressionQuestionnaire, title: "PHQ-9 Depression", week: 14), - task(forQuestionnaire: physicalActivityQuestionnaire, title: "Physical Activity Questionnaire", week: 14), task(forQuestionnaire: ahaLE8Questionnaire, title: "AHA LE8", week: 22), task(forQuestionnaire: berlinQuestionnaire, title: "Berlin", week: 22), task(forQuestionnaire: exerciseBenefitsBarriersQuestionnaire, title: "Exercise Benefits Barriers", week: 22), task(forQuestionnaire: padWalkingImpairmentQuestionnaire, title: "PAD Walking Impairment", week: 22), task(forQuestionnaire: peripheralArteryQuestionnaire, title: "Peripheral Artery Questionnaire (PAQ)", week: 22), - task(forQuestionnaire: phq9DepressionQuestionnaire, title: "PHQ-9 Depression", week: 22), - task(forQuestionnaire: physicalActivityQuestionnaire, title: "Physical Activity Questionnaire", week: 22) + task(forQuestionnaire: phq9DepressionQuestionnaire, title: "PHQ-9 Depression", week: 22) ] } diff --git a/StudyApplication/Study/Views/StudyView.swift b/StudyApplication/Study/Views/StudyView.swift index b512e83..be3231e 100644 --- a/StudyApplication/Study/Views/StudyView.swift +++ b/StudyApplication/Study/Views/StudyView.swift @@ -28,10 +28,6 @@ struct StudyView: View { Divider() enrollSection } - .background { - Color(uiColor: .systemBackground) - .ignoresSafeArea() - } .sheet(isPresented: $showEnrollSheet) { StudyOnboardingFlow(study: study, studyOnboardingComplete: !$showEnrollSheet) } @@ -47,10 +43,6 @@ struct StudyView: View { .lineLimit(6) .padding() } - .background { - Color(uiColor: .systemBackground) - .ignoresSafeArea() - } } @ViewBuilder private var enrollSection: some View { @@ -72,7 +64,12 @@ struct StudyView: View { ZStack { Color(.systemGroupedBackground) .edgesIgnoringSafeArea(.all) - StudyView(study: StudyModule().studies[0]) + StudyApplicationListCard { + StudyView(study: StudyModule().studies[0]) + .padding(.horizontal, -16) + .padding(.vertical, -8) + } + .padding() } .previewWith(standard: StudyApplicationStandard()) { StudyModule()