mirror of
https://github.com/yattee/yattee.git
synced 2026-07-20 22:32:01 +00:00
Add explicit sizing to sheets on macOS
Give player, download, source, and login sheets minimum frame dimensions on macOS so they open at a usable size instead of collapsing.
This commit is contained in:
@@ -144,6 +144,9 @@ struct ErrorDetailsSheet: View {
|
||||
#if os(iOS)
|
||||
.presentationDetents([.medium])
|
||||
#endif
|
||||
#if os(macOS)
|
||||
.frame(minWidth: 450, minHeight: 300)
|
||||
#endif
|
||||
}
|
||||
|
||||
private func copyToClipboard() {
|
||||
|
||||
@@ -227,8 +227,13 @@ struct QualitySelectorView: View {
|
||||
NavigationStack {
|
||||
stackRoot
|
||||
}
|
||||
#if os(iOS)
|
||||
.presentationDetents([.medium, .large])
|
||||
#endif
|
||||
#if os(macOS)
|
||||
.frame(minWidth: 450, minHeight: 500)
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
|
||||
@@ -136,7 +136,12 @@ struct QueueManagementSheet: View {
|
||||
}
|
||||
}
|
||||
.presentationDragIndicator(.visible)
|
||||
#if os(iOS)
|
||||
.presentationDetents([.medium, .large])
|
||||
#endif
|
||||
#if os(macOS)
|
||||
.frame(minWidth: 450, minHeight: 500)
|
||||
#endif
|
||||
}
|
||||
|
||||
// MARK: - Views
|
||||
|
||||
@@ -85,7 +85,12 @@ struct BatchDownloadQualitySheet: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
#if os(iOS)
|
||||
.presentationDetents([.medium])
|
||||
#endif
|
||||
#if os(macOS)
|
||||
.frame(minWidth: 450, minHeight: 300)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -531,6 +531,9 @@ private struct EditFileSourceContent: View {
|
||||
smbProtocolVersion = source.smbProtocolVersion ?? .auto
|
||||
}
|
||||
}
|
||||
#if os(macOS)
|
||||
.frame(minWidth: 500, minHeight: 450)
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,9 @@ struct InstanceLoginView: View {
|
||||
}
|
||||
.accessibilityIdentifier("instance.login.view")
|
||||
}
|
||||
#if os(macOS)
|
||||
.frame(minWidth: 450, minHeight: 350)
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,9 @@ struct NetworkShareDiscoverySheet: View {
|
||||
discoveryService?.stopDiscovery()
|
||||
}
|
||||
}
|
||||
#if os(macOS)
|
||||
.frame(minWidth: 450, minHeight: 400)
|
||||
#endif
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
|
||||
@@ -345,7 +345,12 @@ struct DownloadQualitySheet: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
#if os(iOS)
|
||||
.presentationDetents([.medium, .large])
|
||||
#endif
|
||||
#if os(macOS)
|
||||
.frame(minWidth: 500, minHeight: 500)
|
||||
#endif
|
||||
}
|
||||
|
||||
// MARK: - Main Content Views
|
||||
|
||||
@@ -1984,6 +1984,9 @@ struct VideoInfoView: View {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#if os(macOS)
|
||||
.frame(minWidth: 500, minHeight: 550)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user