diff --git a/ios/Graduately/UI/Components.swift b/ios/Graduately/UI/Components.swift index 53523b9..ebd2ec8 100644 --- a/ios/Graduately/UI/Components.swift +++ b/ios/Graduately/UI/Components.swift @@ -61,6 +61,9 @@ struct MacFillGrid: View { var minHeight: CGFloat = 148 var spacing: CGFloat = 16 var inset: CGFloat = 28 + /// Home embeds the grid in its own scroll view. A second scroller here + /// swallows the wheel once a banner (the changelog) makes the page taller. + var scrolls = true @ViewBuilder var content: (Int) -> Content var body: some View { @@ -74,32 +77,36 @@ struct MacFillGrid: View { let tileH = max(minHeight, (gridH - spacing * CGFloat(max(rows - 1, 0))) / CGFloat(rows)) let tileW = (innerW - spacing * CGFloat(max(cols - 1, 0))) / CGFloat(max(cols, 1)) let lastCount = count - (rows - 1) * cols - ScrollView { - VStack(spacing: spacing) { - ForEach(0.. 1 - HStack(spacing: spacing) { - ForEach(0.. 1 + HStack(spacing: spacing) { + ForEach(0.. 0 { Spacer().frame(height: 4) } - #if os(macOS) - if lines.count >= 4 { - LazyVGrid( - columns: [ - GridItem(.flexible(minimum: 240), spacing: 22, alignment: .topLeading), - GridItem(.flexible(minimum: 240), spacing: 22, alignment: .topLeading), - ], - alignment: .leading, - spacing: 6 - ) { - lineList - } - } else { - VStack(alignment: .leading, spacing: 4) { lineList } - } - #else VStack(alignment: .leading, spacing: 4) { lineList } - #endif } }