From 0475e3976024d0c821d7eb2f7127cf0a57d00990 Mon Sep 17 00:00:00 2001 From: Tony Bark <35226681+tonytins@users.noreply.github.com> Date: Sat, 22 Aug 2026 18:37:20 -0400 Subject: [PATCH] Ideal width --- Sources/AmtrakStatus/ContentView.swift | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/Sources/AmtrakStatus/ContentView.swift b/Sources/AmtrakStatus/ContentView.swift index 602f06f..8701bb3 100644 --- a/Sources/AmtrakStatus/ContentView.swift +++ b/Sources/AmtrakStatus/ContentView.swift @@ -21,32 +21,28 @@ struct ContentView: View { } }.disabled(normalizedStationCode.isEmpty || isLoading) }.padding(10) - + // Most popular Virtual Railfan stations HStack { - Button("Ashland, VA") - { + Button("Ashland, VA") { Task { await loadTrainStatus(forStationCode: "ASD") } } - - Button("San Juan Capistrano, CA") - { + + Button("San Juan Capistrano, CA") { Task { await loadTrainStatus(forStationCode: "SNC") } } - - Button("La Plata, MO") - { + + Button("La Plata, MO") { Task { await loadTrainStatus(forStationCode: "LAP") } } } - Table(rows) { TableColumn("Number", value: \TrainStatusRow.trainNum) TableColumn("Route", value: \TrainStatusRow.routeName) @@ -56,17 +52,18 @@ struct ContentView: View { }.overlay(alignment: .bottomTrailing) { if isLoading { ProgressView() + .frame(alignment: .topTrailing) .padding(10) } } - + HStack { if let errorMessage { Text(errorMessage) } }.padding(10) - - }.padding() + + }.frame(idealWidth: 500) .onAppear { Task { await loadTrainStatus(forStationCode: normalizedStationCode)