From e320fc12613a6a2332c32ec9c69530d74d43c29d Mon Sep 17 00:00:00 2001 From: Jevon Mao Date: Fri, 15 Oct 2021 16:55:08 -0700 Subject: [PATCH] Reduce padding for schedule detail on today screen --- .../Views/TodayView/Components/TodayView/TodayHeroView.swift | 5 +++-- .../Views/ScheduleView/Components/ScheduleDetailView.swift | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Sources/SMHS (iOS)/Views/TodayView/Components/TodayView/TodayHeroView.swift b/Sources/SMHS (iOS)/Views/TodayView/Components/TodayView/TodayHeroView.swift index 4d11268..1ed5247 100644 --- a/Sources/SMHS (iOS)/Views/TodayView/Components/TodayView/TodayHeroView.swift +++ b/Sources/SMHS (iOS)/Views/TodayView/Components/TodayView/TodayHeroView.swift @@ -57,13 +57,14 @@ struct TodayHeroView: View { .font(.title2) .textAlign(.leading) .padding(.bottom, 10) - ScheduleDetailView(scheduleDay: scheduleViewViewModel.currentDaySchedule) + ScheduleDetailView(scheduleDay: scheduleViewViewModel.currentDaySchedule, + horizontalPadding: false) } AnnoucementBanner(viewModel: todayViewViewModel) } - .padding(.horizontal, 23) + .padding(.horizontal) } .padding(.top, (shouldShowTeams && todayViewViewModel.showTeamsBanner) ? 54 : 80) diff --git a/Sources/Shared/Views/ScheduleView/Components/ScheduleDetailView.swift b/Sources/Shared/Views/ScheduleView/Components/ScheduleDetailView.swift index fb5a1c9..02764d0 100644 --- a/Sources/Shared/Views/ScheduleView/Components/ScheduleDetailView.swift +++ b/Sources/Shared/Views/ScheduleView/Components/ScheduleDetailView.swift @@ -58,6 +58,8 @@ struct ScheduleDetailView: View { return formattedDate } + var horizontalPadding = true + var body: some View { ScrollView { if userSettings.preferLegacySchedule { @@ -118,7 +120,7 @@ struct ScheduleDetailView: View { PeriodBlockItem(block: period8) } } - .padding(.horizontal) + .padding(.horizontal, horizontalPadding ? 16 : 0) } } .navigationTitle(scheduleDateDescription)