From 22218dfb60cec1d5005f152561235541b5730e64 Mon Sep 17 00:00:00 2001 From: Go Takagi <15936908+shimastripe@users.noreply.github.com> Date: Thu, 14 Mar 2024 22:20:21 +0900 Subject: [PATCH 1/2] Use fixed size because found a truncated title in the Japanese title --- MyLibrary/Sources/ScheduleFeature/Detail.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/MyLibrary/Sources/ScheduleFeature/Detail.swift b/MyLibrary/Sources/ScheduleFeature/Detail.swift index a602b09..4df9898 100644 --- a/MyLibrary/Sources/ScheduleFeature/Detail.swift +++ b/MyLibrary/Sources/ScheduleFeature/Detail.swift @@ -82,6 +82,7 @@ public struct ScheduleDetailView: View { VStack(alignment: .leading, spacing: 16) { Text(LocalizedStringKey(store.title), bundle: .module) .font(.title.bold()) + .fixedSize(horizontal: false, vertical: true) Text(LocalizedStringKey(store.description), bundle: .module) .font(.callout) if let requirements = store.requirements { From 65221ccc6e14f121ea1226a45fb31b7fbdc512d1 Mon Sep 17 00:00:00 2001 From: Go Takagi <15936908+shimastripe@users.noreply.github.com> Date: Fri, 15 Mar 2024 13:06:57 +0900 Subject: [PATCH 2/2] Remove stacks that were not needed and correct title collapses --- .../Sources/ScheduleFeature/Detail.swift | 50 ++++++++----------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/MyLibrary/Sources/ScheduleFeature/Detail.swift b/MyLibrary/Sources/ScheduleFeature/Detail.swift index 4df9898..8379a68 100644 --- a/MyLibrary/Sources/ScheduleFeature/Detail.swift +++ b/MyLibrary/Sources/ScheduleFeature/Detail.swift @@ -76,38 +76,32 @@ public struct ScheduleDetailView: View { public var body: some View { ScrollView { - HStack { - Spacer() - VStack { - VStack(alignment: .leading, spacing: 16) { - Text(LocalizedStringKey(store.title), bundle: .module) - .font(.title.bold()) - .fixedSize(horizontal: false, vertical: true) - Text(LocalizedStringKey(store.description), bundle: .module) + VStack(alignment: .leading, spacing: 16) { + Text(LocalizedStringKey(store.title), bundle: .module) + .font(.title.bold()) + Text(LocalizedStringKey(store.description), bundle: .module) + .font(.callout) + if let requirements = store.requirements { + VStack(alignment: .leading) { + Text("Requirements", bundle: .module) + .font(.subheadline.bold()) + .foregroundStyle(Color.accentColor) + Text(LocalizedStringKey(requirements), bundle: .module) .font(.callout) - if let requirements = store.requirements { - VStack(alignment: .leading) { - Text("Requirements", bundle: .module) - .font(.subheadline.bold()) - .foregroundStyle(Color.accentColor) - Text(LocalizedStringKey(requirements), bundle: .module) - .font(.callout) - } - .padding() - .overlay { - RoundedRectangle(cornerRadius: 16) - .stroke(Color.accentColor, lineWidth: 1) - } - } } - .padding(.horizontal) - .padding(.bottom) - .frame(maxWidth: 700) // Readable content width for iPad - speakers - .frame(maxWidth: 700) // Readable content width for iPad + .padding() + .overlay { + RoundedRectangle(cornerRadius: 16) + .stroke(Color.accentColor, lineWidth: 1) + } } - Spacer() } + .padding(.horizontal) + .padding(.bottom) + .frame(maxWidth: 700) // Readable content width for iPad + + speakers + .frame(maxWidth: 700) // Readable content width for iPad } .sheet(item: $store.scope(state: \.destination?.safari, action: \.destination.safari)) { sheetStore in