Skip to content

Commit 16c7460

Browse files
committed
Fix look on macOS
... tested on 12, will it be the same on 13? We'll see!
1 parent ad52b3c commit 16c7460

File tree

4 files changed

+98
-6
lines changed

4 files changed

+98
-6
lines changed

Bodies/Bodies.entitlements

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5-
<key>com.apple.security.app-sandbox</key>
6-
<true/>
7-
<key>com.apple.security.files.user-selected.read-only</key>
8-
<true/>
5+
<key>com.apple.security.app-sandbox</key>
6+
<true/>
7+
<key>com.apple.security.files.user-selected.read-only</key>
8+
<true/>
9+
<key>com.apple.security.network.client</key>
10+
<true/>
911
</dict>
1012
</plist>
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1400"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "E87B411B28A3DC6500576D8A"
18+
BuildableName = "Bodies.app"
19+
BlueprintName = "Bodies"
20+
ReferencedContainer = "container:LighterExamples.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Debug"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
<BuildableProductRunnable
44+
runnableDebuggingMode = "0">
45+
<BuildableReference
46+
BuildableIdentifier = "primary"
47+
BlueprintIdentifier = "E87B411B28A3DC6500576D8A"
48+
BuildableName = "Bodies.app"
49+
BlueprintName = "Bodies"
50+
ReferencedContainer = "container:LighterExamples.xcodeproj">
51+
</BuildableReference>
52+
</BuildableProductRunnable>
53+
</LaunchAction>
54+
<ProfileAction
55+
buildConfiguration = "Release"
56+
shouldUseLaunchSchemeArgsEnv = "YES"
57+
savedToolIdentifier = ""
58+
useCustomWorkingDirectory = "NO"
59+
debugDocumentVersioning = "YES">
60+
<BuildableProductRunnable
61+
runnableDebuggingMode = "0">
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "E87B411B28A3DC6500576D8A"
65+
BuildableName = "Bodies.app"
66+
BlueprintName = "Bodies"
67+
ReferencedContainer = "container:LighterExamples.xcodeproj">
68+
</BuildableReference>
69+
</BuildableProductRunnable>
70+
</ProfileAction>
71+
<AnalyzeAction
72+
buildConfiguration = "Debug">
73+
</AnalyzeAction>
74+
<ArchiveAction
75+
buildConfiguration = "Release"
76+
revealArchiveInOrganizer = "YES">
77+
</ArchiveAction>
78+
</Scheme>

Sources/Bodies/BodiesApp.swift

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,19 @@ struct BodiesApp: App {
1414

1515
var body: some Scene {
1616
WindowGroup {
17-
NavigationView { // just for the visual styling
17+
#if os(macOS)
1818
ContentView(database: database)
19+
.frame(width: 440) // just fix it
1920
.navigationTitle("Solar Bodies")
20-
}
21+
#else // iOS
22+
NavigationView { // just for the visual styling
23+
ContentView(database: database)
24+
.navigationTitle("Solar Bodies")
25+
}
26+
#endif
2127
}
28+
#if os(macOS)
29+
.windowStyle(.titleBar)
30+
#endif
2231
}
2332
}

Sources/Bodies/ContentView.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ struct ContentView: View {
6767
try await fetchAndUpdateCache()
6868
}
6969
}
70+
#if os(macOS)
71+
.padding(.top, 1) // don't ask
72+
#endif
7073
}
7174

7275
private func fetchAndUpdateCache() async throws {

0 commit comments

Comments
 (0)