Skip to content

Commit cd69ddc

Browse files
committed
Cleanup
1 parent ede9bd1 commit cd69ddc

9 files changed

Lines changed: 87 additions & 292 deletions

File tree

Xcodes.xcodeproj/project.pbxproj

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@
115115
E81D7EA02805250100A205FC /* Collection+.swift in Sources */ = {isa = PBXBuildFile; fileRef = E81D7E9F2805250100A205FC /* Collection+.swift */; };
116116
E832EAF82B0FBCF4001B570D /* RuntimeInstallationStepDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E832EAF72B0FBCF4001B570D /* RuntimeInstallationStepDetailView.swift */; };
117117
E84B7D0D2B296A8900DBDA2B /* NavigationSplitViewWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = E84B7D0C2B296A8900DBDA2B /* NavigationSplitViewWrapper.swift */; };
118-
E84B7D0F2B30986700DBDA2B /* InfoPane2.swift in Sources */ = {isa = PBXBuildFile; fileRef = E84B7D0E2B30986700DBDA2B /* InfoPane2.swift */; };
119-
E84CF8C12B0FEB8300ECA259 /* RuntimesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E84CF8C02B0FEB8300ECA259 /* RuntimesView.swift */; };
118+
E84E4F522B323A5F003F3959 /* CornerRadiusModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = E84E4F512B323A5F003F3959 /* CornerRadiusModifier.swift */; };
120119
E86671272B309D2F0048559A /* PlatformsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E86671262B309D2F0048559A /* PlatformsView.swift */; };
121120
E87AB3C52939B65E00D72F43 /* Hardware.swift in Sources */ = {isa = PBXBuildFile; fileRef = E87AB3C42939B65E00D72F43 /* Hardware.swift */; };
122121
E87DD6EB25D053FA00D86808 /* Progress+.swift in Sources */ = {isa = PBXBuildFile; fileRef = E87DD6EA25D053FA00D86808 /* Progress+.swift */; };
@@ -313,8 +312,7 @@
313312
E81D7E9F2805250100A205FC /* Collection+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Collection+.swift"; sourceTree = "<group>"; };
314313
E832EAF72B0FBCF4001B570D /* RuntimeInstallationStepDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RuntimeInstallationStepDetailView.swift; sourceTree = "<group>"; };
315314
E84B7D0C2B296A8900DBDA2B /* NavigationSplitViewWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationSplitViewWrapper.swift; sourceTree = "<group>"; };
316-
E84B7D0E2B30986700DBDA2B /* InfoPane2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfoPane2.swift; sourceTree = "<group>"; };
317-
E84CF8C02B0FEB8300ECA259 /* RuntimesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RuntimesView.swift; sourceTree = "<group>"; };
315+
E84E4F512B323A5F003F3959 /* CornerRadiusModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CornerRadiusModifier.swift; sourceTree = "<group>"; };
318316
E856BB73291EDD3D00DC438B /* XcodesKit */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = XcodesKit; path = Xcodes/XcodesKit; sourceTree = "<group>"; };
319317
E86671262B309D2F0048559A /* PlatformsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlatformsView.swift; sourceTree = "<group>"; };
320318
E87AB3C42939B65E00D72F43 /* Hardware.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Hardware.swift; sourceTree = "<group>"; };
@@ -651,9 +649,8 @@
651649
B0C6AD0A2AD9178E00E64698 /* IdenticalBuildView.swift */,
652650
B0C6AD0C2AD91D7900E64698 /* IconView.swift */,
653651
E832EAF72B0FBCF4001B570D /* RuntimeInstallationStepDetailView.swift */,
654-
E84CF8C02B0FEB8300ECA259 /* RuntimesView.swift */,
655-
E84B7D0E2B30986700DBDA2B /* InfoPane2.swift */,
656652
E86671262B309D2F0048559A /* PlatformsView.swift */,
653+
E84E4F512B323A5F003F3959 /* CornerRadiusModifier.swift */,
657654
);
658655
path = InfoPane;
659656
sourceTree = "<group>";
@@ -875,7 +872,6 @@
875872
CA9FF8CF25959A9700E47BAF /* HelperXPCShared.swift in Sources */,
876873
CA735109257BF96D00EA9CF8 /* AttributedText.swift in Sources */,
877874
CAFBDC4E2599B33D003DCC5A /* MainToolbar.swift in Sources */,
878-
E84CF8C12B0FEB8300ECA259 /* RuntimesView.swift in Sources */,
879875
CA11E7BA2598476C00D2EE1C /* XcodeCommands.swift in Sources */,
880876
CAA8589B25A2B83000ACF8C0 /* Aria2CError.swift in Sources */,
881877
536CFDD2263C94DE00026CE0 /* SignedInView.swift in Sources */,
@@ -904,6 +900,7 @@
904900
B0403CFC2AD9A6BF00137C09 /* InstalledStateButtons.swift in Sources */,
905901
36741BFF291E50F500A85AAE /* FileError.swift in Sources */,
906902
CA9FF8872595607900E47BAF /* InstalledXcode.swift in Sources */,
903+
E84E4F522B323A5F003F3959 /* CornerRadiusModifier.swift in Sources */,
907904
B0403CF22AD934B600137C09 /* CompatibilityView.swift in Sources */,
908905
B0403CFE2ADA712C00137C09 /* InfoPaneControls.swift in Sources */,
909906
53CBAB2C263DCC9100410495 /* XcodesAlert.swift in Sources */,
@@ -929,7 +926,6 @@
929926
E8B20CBF2A2EDEC20057D816 /* SDKs+Xcode.swift in Sources */,
930927
CA9FF877259528CC00E47BAF /* Version+XcodeReleases.swift in Sources */,
931928
CABFAA2D2592FBFC00380FEE /* Configure.swift in Sources */,
932-
E84B7D0F2B30986700DBDA2B /* InfoPane2.swift in Sources */,
933929
E84B7D0D2B296A8900DBDA2B /* NavigationSplitViewWrapper.swift in Sources */,
934930
CA73510D257BFCEF00EA9CF8 /* NSAttributedString+.swift in Sources */,
935931
CAFBDB952598FE96003DCC5A /* FocusedValues.swift in Sources */,

Xcodes/Frontend/InfoPane/CompatibilityView.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ struct CompatibilityView: View {
2929
.font(.largeTitle)
3030
}
3131
}
32-
.frame(maxWidth: .infinity, alignment: .leading)
33-
.padding()
34-
.background(.background)
35-
.clipShape(RoundedRectangle(cornerRadius: 5, style: .continuous))
32+
.xcodesBackground()
3633
} else {
3734
EmptyView()
3835
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
//
2+
// CornerRadiusModifier.swift
3+
// Xcodes
4+
//
5+
// Created by Matt Kiazyk on 2023-12-19.
6+
//
7+
8+
import Foundation
9+
import SwiftUI
10+
11+
struct CornerRadiusModifier: ViewModifier {
12+
func body(content: Content) -> some View {
13+
content
14+
.frame(maxWidth: .infinity, alignment: .leading)
15+
.padding()
16+
.background(.background)
17+
.clipShape(RoundedRectangle(cornerRadius: 5, style: .continuous))
18+
}
19+
}
20+
21+
extension View {
22+
func xcodesBackground() -> some View {
23+
self.modifier(
24+
CornerRadiusModifier()
25+
)
26+
}
27+
}
28+
29+
struct Previews_CornerRadius_Previews: PreviewProvider {
30+
static var previews: some View {
31+
HStack {
32+
Text("XCODES RULES!")
33+
}.xcodesBackground()
34+
}
35+
}

Xcodes/Frontend/InfoPane/IdenticalBuildView.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@ struct IdenticalBuildsView: View {
3333
.font(.subheadline)
3434
}
3535
}
36-
.frame(maxWidth: .infinity, alignment: .leading)
37-
.padding()
38-
.background(.background)
39-
.clipShape(RoundedRectangle(cornerRadius: 5, style: .continuous))
36+
.xcodesBackground()
4037
.accessibilityElement()
4138
.accessibility(label: Text("IdenticalBuilds"))
4239
.accessibility(value: Text(accessibilityDescription))

Xcodes/Frontend/InfoPane/InfoPane.swift

Lines changed: 42 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,55 @@ import struct XCModel.SDKs
88

99
struct InfoPane: View {
1010
let xcode: Xcode
11-
1211
var body: some View {
13-
ScrollView {
14-
VStack(alignment: .leading, spacing: 16) {
15-
IconView(installState: xcode.installState)
16-
.frame(maxWidth: .infinity, alignment: .center)
17-
18-
Text(verbatim: "Xcode \(xcode.description) \(xcode.version.buildMetadataIdentifiersDisplay)")
19-
.font(.title)
20-
21-
InfoPaneControls(xcode: xcode)
22-
23-
Divider()
24-
25-
Group {
26-
RuntimesView(xcode: xcode)
12+
ScrollView(.vertical) {
13+
HStack(alignment: .top) {
14+
VStack {
15+
VStack(spacing: 5) {
16+
HStack {
17+
IconView(installState: xcode.installState)
18+
19+
Text(verbatim: "Xcode \(xcode.description) \(xcode.version.buildMetadataIdentifiersDisplay)")
20+
.font(.title)
21+
.frame(maxWidth: .infinity, alignment: .leading)
22+
}
23+
InfoPaneControls(xcode: xcode)
24+
}
25+
.xcodesBackground()
26+
27+
28+
VStack {
29+
Text("Platforms")
30+
.font(.title3)
31+
.frame(maxWidth: .infinity, alignment: .leading)
32+
PlatformsView(xcode: xcode)
33+
}
34+
.xcodesBackground()
35+
}
36+
37+
VStack(alignment: .leading) {
2738
ReleaseDateView(date: xcode.releaseDate, url: xcode.releaseNotesURL)
28-
ReleaseNotesView(url: xcode.releaseNotesURL)
29-
IdenticalBuildsView(builds: xcode.identicalBuilds)
3039
CompatibilityView(requiredMacOSVersion: xcode.requiredMacOSVersion)
31-
SDKsView(sdks: xcode.sdks)
32-
CompilersView(compilers: xcode.compilers)
40+
IdenticalBuildsView(builds: xcode.identicalBuilds)
41+
SDKandCompilers
3342
}
34-
35-
Spacer()
43+
.frame(width: 200)
44+
3645
}
3746
}
3847
}
48+
49+
@ViewBuilder
50+
var SDKandCompilers: some View {
51+
VStack(alignment: .leading, spacing: 16) {
52+
SDKsView(sdks: xcode.sdks)
53+
CompilersView(compilers: xcode.compilers)
54+
}
55+
.frame(maxWidth: .infinity, alignment: .leading)
56+
.padding()
57+
.background(.background)
58+
.clipShape(RoundedRectangle(cornerRadius: 5, style: .continuous))
59+
}
3960
}
4061

4162
#Preview(XcodePreviewName.allCases[0].rawValue) { makePreviewContent(for: 0) }

Xcodes/Frontend/InfoPane/InfoPane2.swift

Lines changed: 0 additions & 176 deletions
This file was deleted.

0 commit comments

Comments
 (0)