From 2c174ab72e33209f7ef2cc026b6316823b8c831b Mon Sep 17 00:00:00 2001 From: Thomas Durand Date: Wed, 22 Feb 2023 07:06:01 +0100 Subject: [PATCH] Fixed compact layout for video tip when video autoplay is disabled (#989) --- Packages/Status/Sources/Status/Media/VideoPlayerView.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Packages/Status/Sources/Status/Media/VideoPlayerView.swift b/Packages/Status/Sources/Status/Media/VideoPlayerView.swift index 32927112..3785c8b3 100644 --- a/Packages/Status/Sources/Status/Media/VideoPlayerView.swift +++ b/Packages/Status/Sources/Status/Media/VideoPlayerView.swift @@ -45,6 +45,7 @@ class VideoPlayerViewModel: ObservableObject { struct VideoPlayerView: View { @Environment(\.scenePhase) private var scenePhase + @Environment(\.isCompact) private var isCompact @EnvironmentObject private var preferences: UserPreferences @EnvironmentObject private var theme: Theme @@ -56,9 +57,9 @@ struct VideoPlayerView: View { if !preferences.autoPlayVideo { Image(systemName: "play.fill") - .font(.largeTitle) + .font(isCompact ? .body : .largeTitle) .foregroundColor(theme.tintColor) - .padding() + .padding(.all, isCompact ? 6 : nil) .background(Circle().fill(.thinMaterial)) .padding(theme.statusDisplayStyle == .compact ? 0 : 10) }