crossmate

A collaborative crossword app for iOS
Log | Files | Refs | LICENSE

commit 820ddda22e74306e1b9228aa745c17ed1cc6939c
parent 6f7335450860a28514a4ca4d2084612d9cfdba57
Author: Michael Camilleri <[email protected]>
Date:   Fri,  3 Jul 2026 13:56:35 +0900

Tweak layout sizes further

Diffstat:
MCrossmate/Views/GameList/GameCardView.swift | 43++++++++++---------------------------------
MCrossmate/Views/GameList/GameListView.swift | 5++++-
2 files changed, 14 insertions(+), 34 deletions(-)

diff --git a/Crossmate/Views/GameList/GameCardView.swift b/Crossmate/Views/GameList/GameCardView.swift @@ -3,7 +3,7 @@ import SwiftUI // MARK: - Card (regular width) enum CardMetrics { - static let height: CGFloat = 88 + static let height: CGFloat = 110 static let cornerRadius: CGFloat = 12 } @@ -303,40 +303,17 @@ struct GameMetadataView: View { } var body: some View { - if let puzzleDate, let publisher { - ViewThatFits(in: .horizontal) { - HStack(spacing: 0) { - Text(puzzleDate, format: .dateTime.day().month(.abbreviated).year()) - Text(" • ") - Text(publisher) - } + if let puzzleDate { + Text(puzzleDate, format: .dateTime.day().month(.abbreviated).year()) + .font(font) + .foregroundStyle(.secondary) + } + if let publisher { + Text(publisher) .font(font) + .foregroundStyle(.secondary) .lineLimit(1) - - VStack(alignment: .leading, spacing: 2) { - puzzleDateView(puzzleDate) - publisherView(publisher) - } - } - } else { - if let puzzleDate { - puzzleDateView(puzzleDate) - } - if let publisher { - publisherView(publisher) - } + .truncationMode(.tail) } } - - private func puzzleDateView(_ puzzleDate: Date) -> some View { - Text(puzzleDate, format: .dateTime.day().month(.abbreviated).year()) - .font(font) - } - - private func publisherView(_ publisher: String) -> some View { - Text(publisher) - .font(font) - .lineLimit(1) - .truncationMode(.tail) - } } diff --git a/Crossmate/Views/GameList/GameListView.swift b/Crossmate/Views/GameList/GameListView.swift @@ -472,7 +472,10 @@ struct GameListView: View { // MARK: - Grid layout (regular width / iPad) private var gridColumns: [GridItem] { - [GridItem(.adaptive(minimum: 320), spacing: 12)] + // 380 keeps the 13" iPad to two portrait columns (three at 320 left + // each card's text column so narrow that every headline title was + // scale-crushed back down to metadata size). + [GridItem(.adaptive(minimum: 380), spacing: 12)] } @ViewBuilder