Ideal width

This commit is contained in:
Tony Bark 2026-08-22 18:37:20 -04:00
parent 789e697828
commit 0475e39760

View file

@ -24,29 +24,25 @@ struct ContentView: View {
// 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,6 +52,7 @@ struct ContentView: View {
}.overlay(alignment: .bottomTrailing) {
if isLoading {
ProgressView()
.frame(alignment: .topTrailing)
.padding(10)
}
}
@ -66,7 +63,7 @@ struct ContentView: View {
}
}.padding(10)
}.padding()
}.frame(idealWidth: 500)
.onAppear {
Task {
await loadTrainStatus(forStationCode: normalizedStationCode)