mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2026-03-25 08:55:46 +00:00
Place PlatformsPocket back to XcodeListView
This commit is contained in:
parent
950045b427
commit
9a866acf53
4 changed files with 31 additions and 10 deletions
|
|
@ -26,7 +26,7 @@ struct NavigationSplitViewWrapper<Sidebar, Detail>: View where Sidebar: View, De
|
|||
|
||||
if #available(macOS 14, *) {
|
||||
sidebar
|
||||
.navigationSplitViewColumnWidth(min: 300, ideal: 300)
|
||||
.navigationSplitViewColumnWidth(min: 290, ideal: 290)
|
||||
} else {
|
||||
sidebar
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ struct MainToolbarModifier: ViewModifier {
|
|||
@Binding var category: XcodeListCategory
|
||||
@Binding var isInstalledOnly: Bool
|
||||
@Binding var isShowingInfoPane: Bool
|
||||
@SwiftUI.Environment(\.openWindow) private var openWindow
|
||||
|
||||
func body(content: Content) -> some View {
|
||||
content
|
||||
|
|
@ -69,13 +68,6 @@ struct MainToolbarModifier: ViewModifier {
|
|||
}
|
||||
}
|
||||
.help("FilterInstalledDescription")
|
||||
|
||||
Button(action: {
|
||||
openWindow(id: "platforms")
|
||||
}) {
|
||||
Label("Platforms", systemImage: "square.3.layers.3d")
|
||||
}
|
||||
.help("PlatformsDescription")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,35 @@ struct XcodeListView: View {
|
|||
XcodeListViewRow(xcode: xcode, selected: selectedXcodeID == xcode.id, appState: appState)
|
||||
}
|
||||
.listStyle(.sidebar)
|
||||
.safeAreaInset(edge: .bottom, spacing: 0) {
|
||||
PlatformsPocket()
|
||||
.padding(.horizontal)
|
||||
.padding(.vertical, 8)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct PlatformsPocket: View {
|
||||
@SwiftUI.Environment(\.openWindow) private var openWindow
|
||||
|
||||
var body: some View {
|
||||
Button(action: {
|
||||
openWindow(id: "platforms")
|
||||
}
|
||||
) {
|
||||
HStack(spacing: 5) {
|
||||
Image(systemName: "square.3.layers.3d")
|
||||
.font(.title3.weight(.medium))
|
||||
Text("PlatformsDescription")
|
||||
}
|
||||
.font(.body.weight(.medium))
|
||||
.padding(.horizontal)
|
||||
.padding(.vertical, 12)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.background(.quaternary.opacity(0.75))
|
||||
.clipShape(RoundedRectangle(cornerRadius: 8, style: .continuous))
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14467,7 +14467,7 @@
|
|||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Installed platforms"
|
||||
"value" : "Installed Platforms"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue