Skip to content

Commit 9a866ac

Browse files
committed
Place PlatformsPocket back to XcodeListView
1 parent 950045b commit 9a866ac

File tree

4 files changed

+31
-10
lines changed

4 files changed

+31
-10
lines changed

Xcodes/Frontend/Common/NavigationSplitViewWrapper.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ struct NavigationSplitViewWrapper<Sidebar, Detail>: View where Sidebar: View, De
2626

2727
if #available(macOS 14, *) {
2828
sidebar
29-
.navigationSplitViewColumnWidth(min: 300, ideal: 300)
29+
.navigationSplitViewColumnWidth(min: 290, ideal: 290)
3030
} else {
3131
sidebar
3232
}

Xcodes/Frontend/XcodeList/MainToolbar.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ struct MainToolbarModifier: ViewModifier {
55
@Binding var category: XcodeListCategory
66
@Binding var isInstalledOnly: Bool
77
@Binding var isShowingInfoPane: Bool
8-
@SwiftUI.Environment(\.openWindow) private var openWindow
98

109
func body(content: Content) -> some View {
1110
content
@@ -69,13 +68,6 @@ struct MainToolbarModifier: ViewModifier {
6968
}
7069
}
7170
.help("FilterInstalledDescription")
72-
73-
Button(action: {
74-
openWindow(id: "platforms")
75-
}) {
76-
Label("Platforms", systemImage: "square.3.layers.3d")
77-
}
78-
.help("PlatformsDescription")
7971
}
8072
}
8173
}

Xcodes/Frontend/XcodeList/XcodeListView.swift

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,35 @@ struct XcodeListView: View {
4343
XcodeListViewRow(xcode: xcode, selected: selectedXcodeID == xcode.id, appState: appState)
4444
}
4545
.listStyle(.sidebar)
46+
.safeAreaInset(edge: .bottom, spacing: 0) {
47+
PlatformsPocket()
48+
.padding(.horizontal)
49+
.padding(.vertical, 8)
50+
}
51+
}
52+
}
53+
54+
struct PlatformsPocket: View {
55+
@SwiftUI.Environment(\.openWindow) private var openWindow
56+
57+
var body: some View {
58+
Button(action: {
59+
openWindow(id: "platforms")
60+
}
61+
) {
62+
HStack(spacing: 5) {
63+
Image(systemName: "square.3.layers.3d")
64+
.font(.title3.weight(.medium))
65+
Text("PlatformsDescription")
66+
}
67+
.font(.body.weight(.medium))
68+
.padding(.horizontal)
69+
.padding(.vertical, 12)
70+
.frame(maxWidth: .infinity, alignment: .leading)
71+
.background(.quaternary.opacity(0.75))
72+
.clipShape(RoundedRectangle(cornerRadius: 8, style: .continuous))
73+
}
74+
.buttonStyle(.plain)
4675
}
4776
}
4877

Xcodes/Resources/Localizable.xcstrings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14467,7 +14467,7 @@
1446714467
"en" : {
1446814468
"stringUnit" : {
1446914469
"state" : "translated",
14470-
"value" : "Installed platforms"
14470+
"value" : "Installed Platforms"
1447114471
}
1447214472
}
1447314473
}

0 commit comments

Comments
 (0)