mirror of
https://github.com/yattee/yattee.git
synced 2026-05-12 18:35:05 +00:00
Fix collapsed sheets on macOS across the app
Add macOS-only minimum frame sizing to sheets that wrap a NavigationStack/Form without intrinsic size, so they render properly instead of collapsing to just the toolbar. Affects Customize Home, subscription/channel view options, playlist create/edit, search filters, media browser options, instance picker, log filters, preset editor, and legacy data import result.
This commit is contained in:
@@ -155,6 +155,9 @@ struct ViewOptionsSheet: View {
|
||||
.presentationDetents([.height(260)])
|
||||
.presentationDragIndicator(.visible)
|
||||
#endif
|
||||
#if os(macOS)
|
||||
.frame(minWidth: 420, minHeight: 320)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -118,6 +118,9 @@ struct HomeView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
#if os(macOS)
|
||||
.frame(minWidth: 500, minHeight: 450)
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
.onAppear {
|
||||
|
||||
@@ -32,6 +32,9 @@ struct MediaBrowserViewOptionsSheet: View {
|
||||
.presentationDetents([.height(280)])
|
||||
.presentationDragIndicator(.visible)
|
||||
#endif
|
||||
#if os(macOS)
|
||||
.frame(minWidth: 420, minHeight: 320)
|
||||
#endif
|
||||
.onAppear {
|
||||
// Reset sort order if current selection is not available for this source type
|
||||
if !availableSortOptions.contains(sortOrder) {
|
||||
|
||||
@@ -89,6 +89,9 @@ struct PlaylistFormSheet: View {
|
||||
#if os(iOS)
|
||||
.presentationDetents([.medium])
|
||||
#endif
|
||||
#if os(macOS)
|
||||
.frame(minWidth: 500, minHeight: 400)
|
||||
#endif
|
||||
}
|
||||
|
||||
// MARK: - Form Content
|
||||
|
||||
@@ -1476,6 +1476,9 @@ struct SearchFiltersSheet: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
#if os(macOS)
|
||||
.frame(minWidth: 500, minHeight: 400)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -65,6 +65,9 @@ struct InstancePickerSheet: View {
|
||||
}
|
||||
}
|
||||
.presentationDetents([.medium, .large])
|
||||
#if os(macOS)
|
||||
.frame(minWidth: 450, minHeight: 500)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -219,6 +219,9 @@ struct LegacyDataImportView: View {
|
||||
.padding()
|
||||
.interactiveDismissDisabled()
|
||||
}
|
||||
#if os(macOS)
|
||||
.frame(minWidth: 500, minHeight: 450)
|
||||
#endif
|
||||
}
|
||||
|
||||
// MARK: - Actions
|
||||
|
||||
@@ -308,6 +308,9 @@ private struct LogFiltersSheet: View {
|
||||
}
|
||||
}
|
||||
.presentationDetents([.medium])
|
||||
#if os(macOS)
|
||||
.frame(minWidth: 500, minHeight: 500)
|
||||
#endif
|
||||
}
|
||||
|
||||
private func binding(for category: LogCategory) -> Binding<Bool> {
|
||||
|
||||
@@ -145,6 +145,9 @@ struct PresetEditorView: View {
|
||||
#if os(iOS)
|
||||
.presentationDetents([.medium])
|
||||
#endif
|
||||
#if os(macOS)
|
||||
.frame(minWidth: 500, minHeight: 350)
|
||||
#endif
|
||||
}
|
||||
|
||||
private func saveIfValid() {
|
||||
|
||||
@@ -189,6 +189,9 @@ struct ManageChannelsView: View {
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#if os(macOS)
|
||||
.frame(minWidth: 500, minHeight: 400)
|
||||
#endif
|
||||
.presentationDetents([.height(360), .large])
|
||||
.presentationDragIndicator(.visible)
|
||||
.liquidGlassSheetContent(sourceID: "manageChannelsViewOptions", in: sheetTransition)
|
||||
|
||||
@@ -341,6 +341,9 @@ struct SubscriptionsView: View {
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#if os(macOS)
|
||||
.frame(minWidth: 500, minHeight: 450)
|
||||
#endif
|
||||
.presentationDetents([.height(420), .large])
|
||||
.presentationDragIndicator(.visible)
|
||||
.liquidGlassSheetContent(sourceID: "subscriptionsViewOptions", in: sheetTransition)
|
||||
|
||||
Reference in New Issue
Block a user