From 726a02bf008995e1e454d1be9bfeeb3a52d04f9d Mon Sep 17 00:00:00 2001 From: Go Takagi <15936908+shimastripe@users.noreply.github.com> Date: Fri, 15 Mar 2024 13:37:35 +0900 Subject: [PATCH] Fix a truncated session title in Japanese (#33) * Use fixed size because found a truncated title in the Japanese title * Remove stacks that were not needed and correct title collapses --- .../Sources/ScheduleFeature/Detail.swift | 49 +++++++++---------- 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/MyLibrary/Sources/ScheduleFeature/Detail.swift b/MyLibrary/Sources/ScheduleFeature/Detail.swift index a602b09..8379a68 100644 --- a/MyLibrary/Sources/ScheduleFeature/Detail.swift +++ b/MyLibrary/Sources/ScheduleFeature/Detail.swift @@ -76,37 +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()) - 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