Skip to content

Commit 35314ce

Browse files
author
Marlon
committed
Adjusts layout of platform views
1 parent 9d73cd2 commit 35314ce

1 file changed

Lines changed: 23 additions & 23 deletions

File tree

Xcodes/Frontend/InfoPane/PlatformsView.swift

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -40,33 +40,33 @@ struct PlatformsView: View {
4040
Text("\(runtime.visibleIdentifier)")
4141
.font(.headline)
4242
pathIfAvailable(xcode: xcode, runtime: runtime)
43+
44+
if runtime.installState == .notInstalled {
45+
// TODO: Update the downloadableRuntimes with the appropriate installState so we don't have to check path awkwardly
46+
if appState.runtimeInstallPath(xcode: xcode, runtime: runtime) != nil {
47+
EmptyView()
48+
} else {
49+
HStack {
50+
Spacer()
51+
DownloadRuntimeButton(runtime: runtime)
52+
}
53+
}
54+
}
55+
4356
Spacer()
4457
Text(runtime.downloadFileSizeString)
4558
.font(.subheadline)
59+
.frame(width: 70, alignment: .trailing)
4660
}
47-
switch runtime.installState {
48-
case .installed:
49-
EmptyView()
50-
case .notInstalled:
51-
// TODO: Update the downloadableRuntimes with the appropriate installState so we don't have to check path awkwardly
52-
if let path = appState.runtimeInstallPath(xcode: xcode, runtime: runtime) {
53-
EmptyView()
54-
} else {
55-
HStack {
56-
Spacer()
57-
DownloadRuntimeButton(runtime: runtime)
58-
}
59-
}
60-
61-
case .installing(let installationStep):
62-
HStack(alignment: .top, spacing: 5){
63-
RuntimeInstallationStepDetailView(installationStep: installationStep)
64-
.fixedSize(horizontal: false, vertical: true)
65-
Spacer()
66-
CancelRuntimeInstallButton(runtime: runtime)
67-
}
68-
69-
}
61+
62+
if case let .installing(installationStep) = runtime.installState {
63+
HStack(alignment: .top, spacing: 5){
64+
RuntimeInstallationStepDetailView(installationStep: installationStep)
65+
.fixedSize(horizontal: false, vertical: true)
66+
Spacer()
67+
CancelRuntimeInstallButton(runtime: runtime)
68+
}
69+
}
7070
}
7171
}
7272

0 commit comments

Comments
 (0)