Skip to content

Commit 8811a6d

Browse files
authored
Merge pull request #564 from LePips/left-align-unarchiving-pane
Left Align Unarchiving Pane
2 parents f973e7d + 66deeb0 commit 8811a6d

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

Xcodes/Frontend/InfoPane/InfoPane.swift

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,15 @@ struct InfoPane: View {
7575
#Preview(XcodePreviewName.allCases[2].rawValue) { makePreviewContent(for: 2) }
7676
#Preview(XcodePreviewName.allCases[3].rawValue) { makePreviewContent(for: 3) }
7777
#Preview(XcodePreviewName.allCases[4].rawValue) { makePreviewContent(for: 4) }
78+
#Preview(XcodePreviewName.allCases[5].rawValue) { makePreviewContent(for: 5) }
7879

7980
private func makePreviewContent(for index: Int) -> some View {
8081
let name = XcodePreviewName.allCases[index]
8182
return InfoPane(xcode: xcodeDict[name]!)
8283
.environmentObject(configure(AppState()) {
8384
$0.allXcodes = [xcodeDict[name]!]
8485
})
85-
.frame(width: 300, height: 400)
86+
.frame(width: 600, height: 400)
8687
.padding()
8788
}
8889

@@ -92,6 +93,7 @@ enum XcodePreviewName: String, CaseIterable, Identifiable {
9293
case Populated_Uninstalled
9394
case Basic_Installed
9495
case Basic_Installing
96+
case Basic_Unarchiving
9597

9698
var id: XcodePreviewName { self }
9799
}
@@ -152,6 +154,14 @@ var xcodeDict: [XcodePreviewName: Xcode] = [
152154
sdks: nil,
153155
compilers: nil
154156
),
157+
.Basic_Unarchiving: .init(
158+
version: _versionWithMeta,
159+
installState: .installing(.unarchiving),
160+
selected: false,
161+
icon: nil,
162+
sdks: nil,
163+
compilers: nil
164+
),
155165
]
156166

157167
var downloadableRuntimes: [DownloadableRuntime] = {

Xcodes/Frontend/InfoPane/InfoPaneControls.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ struct InfoPaneControls: View {
2525
case .installing(let installationStep):
2626
HStack(alignment: .top) {
2727
InstallationStepDetailView(installationStep: installationStep)
28+
.frame(maxWidth: .infinity, alignment: .leading)
2829
CancelInstallButton(xcode: xcode)
2930
}
3031
case .installed(_):
@@ -39,6 +40,7 @@ struct InfoPaneControls: View {
3940
#Preview(XcodePreviewName.allCases[2].rawValue) { makePreviewContent(for: 2) }
4041
#Preview(XcodePreviewName.allCases[3].rawValue) { makePreviewContent(for: 3) }
4142
#Preview(XcodePreviewName.allCases[4].rawValue) { makePreviewContent(for: 4) }
43+
#Preview(XcodePreviewName.allCases[5].rawValue) { makePreviewContent(for: 5) }
4244

4345
private func makePreviewContent(for index: Int) -> some View {
4446
let name = XcodePreviewName.allCases[index]
@@ -47,6 +49,6 @@ private func makePreviewContent(for index: Int) -> some View {
4749
.environmentObject(configure(AppState()) {
4850
$0.allXcodes = [xcodeDict[name]!]
4951
})
50-
.frame(width: 300)
52+
.frame(width: 500)
5153
.padding()
5254
}

0 commit comments

Comments
 (0)