diff options
| author | Fuwn <[email protected]> | 2025-06-07 07:23:24 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-06-07 07:23:24 -0700 |
| commit | 78fc6a1563cabb72b0a0268963a966e3893fd209 (patch) | |
| tree | 38a83d633d19aad57ac4da740a7009f4796753c5 /Sora/Views | |
| parent | feat: Development commit (diff) | |
| download | sora-testing-78fc6a1563cabb72b0a0268963a966e3893fd209.tar.xz sora-testing-78fc6a1563cabb72b0a0268963a966e3893fd209.zip | |
feat: Development commit
Diffstat (limited to 'Sora/Views')
| -rw-r--r-- | Sora/Views/MainView.swift | 8 | ||||
| -rw-r--r-- | Sora/Views/Post/Details/PostDetailsView.swift | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/Sora/Views/MainView.swift b/Sora/Views/MainView.swift index 44a0a8a..87bc090 100644 --- a/Sora/Views/MainView.swift +++ b/Sora/Views/MainView.swift @@ -86,9 +86,11 @@ struct MainView: View { } #Preview { - let screenSize = NSScreen.main?.frame.size ?? CGSize(width: 1_920, height: 1_080) - let heightCoefficient = screenSize.height / 1_080 - let widthCoefficient = screenSize.width / 1_440 + #if os(macOS) + let screenSize = NSScreen.main?.frame.size ?? CGSize(width: 1_920, height: 1_080) + let heightCoefficient = screenSize.height / 1_080 + let widthCoefficient = screenSize.width / 1_440 + #endif MainView() .environmentObject(SettingsManager()) diff --git a/Sora/Views/Post/Details/PostDetailsView.swift b/Sora/Views/Post/Details/PostDetailsView.swift index e040bc3..108f12c 100644 --- a/Sora/Views/Post/Details/PostDetailsView.swift +++ b/Sora/Views/Post/Details/PostDetailsView.swift @@ -119,7 +119,9 @@ struct PostDetailsView: View { } .sheet(isPresented: $isTagsSheetPresented) { PostDetailsTagsView(isPresented: $isTagsSheetPresented, tags: post.tags) - .frame(minHeight: 250) + #if os(macOS) + .frame(minHeight: (NSScreen.main?.frame.height ?? 1_080) / 2, maxHeight: .infinity) + #endif } } } |