From 95124d87bbee013d7a0c5fe6e4acc561197d4eda Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Thu, 24 Sep 2026 23:48:47 +0200 Subject: [PATCH] Fade corner layout panels while the video grows over them on toggle --- Yattee/Views/Player/CornerPlayerLayout.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Yattee/Views/Player/CornerPlayerLayout.swift b/Yattee/Views/Player/CornerPlayerLayout.swift index bb965e2f..bfa2a088 100644 --- a/Yattee/Views/Player/CornerPlayerLayout.swift +++ b/Yattee/Views/Player/CornerPlayerLayout.swift @@ -383,6 +383,11 @@ struct CornerPlayerLayout: View { .background(panelBackgroundColor.ignoresSafeArea(edges: .bottom)) .frame(width: totalColumnWidth) .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topTrailing) + // Toggle only: fade with the video growing over it (and + // back in as it shrinks). Drag hides keep the panel solid + // — the finger drives the edge, the panel is uncovered + .opacity(isPanelVisible ? 1 : 0) + .animation(isPanelDragActive ? nil : .easeInOut(duration: panelToggleDuration), value: panelToggleGeneration) .allowsHitTesting(showsSideColumn) .accessibilityHidden(!showsSideColumn) } @@ -415,6 +420,8 @@ struct CornerPlayerLayout: View { .animation(isPanelDragActive ? nil : .spring(response: 0.3, dampingFraction: 0.8), value: isBelowPanelExpanded) .animation(isPanelDragActive ? nil : .spring(response: 0.3, dampingFraction: 0.8), value: belowPanelExpandOffset) .animation(isPanelDragActive ? nil : .spring(response: 0.3, dampingFraction: 1.0), value: playerState?.displayAspectRatio) + // Toggle only: fade with the video (see the column) + .opacity(isPanelVisible ? 1 : 0) .animation(isPanelDragActive ? nil : .easeInOut(duration: panelToggleDuration), value: panelToggleGeneration) .animation(isPanelDragActive ? nil : .spring(response: 0.3, dampingFraction: 1.0), value: sideColumnDragOffset) .zIndex(isBelowPanelRaised ? 2 : 0)