mirror of
https://github.com/NinjaCheetah/RIT-Dining.git
synced 2026-03-04 21:25:27 -05:00
Increased padding around content in views
This increased padding is roughly the same as the padding around native iOS components like lists, which makes it look a lot more uniform. The increased padding also makes everything feel a little less cramped.
This commit is contained in:
@@ -17,6 +17,7 @@ struct LoadingView: View {
|
||||
@State var loadingType: LoadingType = .normal
|
||||
|
||||
@State private var rotationDegrees: Double = 0
|
||||
@State private var loadingText: String = ""
|
||||
|
||||
private var animation: Animation {
|
||||
.linear
|
||||
@@ -33,6 +34,13 @@ struct LoadingView: View {
|
||||
}
|
||||
}
|
||||
|
||||
var loadingTextOptions: [String] = [
|
||||
"Loading...",
|
||||
"One moment...",
|
||||
"Hang tight...",
|
||||
"Just a moment...",
|
||||
]
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
if loadFailed {
|
||||
@@ -55,8 +63,11 @@ struct LoadingView: View {
|
||||
rotationDegrees = 360.0
|
||||
}
|
||||
}
|
||||
Text("Loading...")
|
||||
Text(loadingText)
|
||||
.foregroundStyle(.secondary)
|
||||
.onAppear {
|
||||
loadingText = loadingTextOptions.randomElement() ?? ""
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
|
||||
Reference in New Issue
Block a user