mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2026-04-21 13:25:55 +00:00
Put InfoPane content in ScrollView
This issue was revealed when I broke the identical builds functionality with the Apple data source. https://github.com/RobotsAndPencils/XcodesApp/pull/100#pullrequestreview-584917125
This commit is contained in:
parent
b8bae4f32c
commit
3208a4d8d2
1 changed files with 12 additions and 13 deletions
|
|
@ -11,8 +11,8 @@ struct InfoPane: View {
|
||||||
@SwiftUI.Environment(\.openURL) var openURL: OpenURLAction
|
@SwiftUI.Environment(\.openURL) var openURL: OpenURLAction
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
Group {
|
if let xcode = appState.allXcodes.first(where: { $0.id == selectedXcodeID }) {
|
||||||
if let xcode = appState.allXcodes.first(where: { $0.id == selectedXcodeID }) {
|
ScrollView {
|
||||||
VStack(spacing: 16) {
|
VStack(spacing: 16) {
|
||||||
icon(for: xcode)
|
icon(for: xcode)
|
||||||
|
|
||||||
|
|
@ -61,12 +61,13 @@ struct InfoPane: View {
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
} else {
|
.padding()
|
||||||
empty
|
|
||||||
}
|
}
|
||||||
|
.frame(minWidth: 200, maxWidth: .infinity)
|
||||||
|
} else {
|
||||||
|
empty
|
||||||
|
.frame(minWidth: 200, maxWidth: .infinity)
|
||||||
}
|
}
|
||||||
.padding()
|
|
||||||
.frame(minWidth: 200, maxWidth: .infinity)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
|
|
@ -212,13 +213,11 @@ struct InfoPane: View {
|
||||||
|
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
private var empty: some View {
|
private var empty: some View {
|
||||||
VStack {
|
Text("No Xcode Selected")
|
||||||
Spacer()
|
.font(.title)
|
||||||
Text("No Xcode Selected")
|
.foregroundColor(.secondary)
|
||||||
.font(.title)
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
.foregroundColor(.secondary)
|
.padding()
|
||||||
Spacer()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue