mirror of
https://github.com/yattee/yattee.git
synced 2026-10-26 14:42:53 +00:00
Replace UIScreen.main with scene-local context
- List row hairlines read displayScale from the SwiftUI environment - MPV render views take contentScaleFactor from traitCollection and re-apply it on UITraitDisplayScale changes - ExpandedPlayerWindow scales against the presenting view's own height - MPVPiPBridge sizes the PiP layer from the container view's window scene screen (UIScreen.main kept only as a nil-window fallback) - WideScreenPlayerLayout falls back to the offered geometry size - Remote control fullscreen state comes from the player sheet's layout pass via NavigationCoordinator.isWideScreenLayoutActive instead of screen bounds aspect - Orientation TODOs for Dynamic Island side detection and prefersInterfaceOrientationLocked
This commit is contained in:
@@ -16,6 +16,8 @@ struct SourceListRow<Content: View>: View {
|
||||
|
||||
@ViewBuilder let content: () -> Content
|
||||
|
||||
@Environment(\.displayScale) private var displayScale
|
||||
|
||||
/// Horizontal padding for row content.
|
||||
#if os(macOS)
|
||||
private let horizontalPadding: CGFloat = 12
|
||||
@@ -64,7 +66,7 @@ struct SourceListRow<Content: View>: View {
|
||||
#if os(iOS)
|
||||
Rectangle()
|
||||
.fill(Color(uiColor: .separator))
|
||||
.frame(height: 1 / UIScreen.main.scale)
|
||||
.frame(height: 1 / displayScale)
|
||||
.padding(.leading, dividerLeadingPadding)
|
||||
#elseif os(macOS)
|
||||
Rectangle()
|
||||
|
||||
@@ -56,6 +56,8 @@ struct VideoListRow<Content: View>: View {
|
||||
|
||||
@ViewBuilder let content: () -> Content
|
||||
|
||||
@Environment(\.displayScale) private var displayScale
|
||||
|
||||
/// Horizontal padding for row content.
|
||||
private let horizontalPadding: CGFloat = 16
|
||||
|
||||
@@ -91,7 +93,7 @@ struct VideoListRow<Content: View>: View {
|
||||
#if os(iOS)
|
||||
Rectangle()
|
||||
.fill(Color(uiColor: .separator))
|
||||
.frame(height: 1 / UIScreen.main.scale)
|
||||
.frame(height: 1 / displayScale)
|
||||
.padding(.leading, dividerLeadingPadding)
|
||||
#elseif os(macOS)
|
||||
Rectangle()
|
||||
|
||||
Reference in New Issue
Block a user