From 393cc558d6cfabb39c9fac7f34ff5659cc446303 Mon Sep 17 00:00:00 2001 From: Jis G Jacob Date: Wed, 22 Apr 2026 11:11:32 +0530 Subject: [PATCH] Atoll: Center notch after leaving minimalist mode and enlarge idle animation - Also remove fixed viewports for inactive animations Signed-off-by: Jis G Jacob --- DynamicIsland/ContentView.swift | 6 ++++-- DynamicIsland/components/IdleAnimationView.swift | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DynamicIsland/ContentView.swift b/DynamicIsland/ContentView.swift index 444f3e3..495b4ec 100644 --- a/DynamicIsland/ContentView.swift +++ b/DynamicIsland/ContentView.swift @@ -546,7 +546,7 @@ struct ContentView: View { maxHeight: dynamicNotchSize.height + currentShadowPadding + (isDynamicIslandMode ? dynamicIslandTopOffset : 0), alignment: .top ) - .frame(maxHeight: .infinity, alignment: .top) + .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .top) .environmentObject(privacyManager) .background(dragDetector) .environmentObject(vm) @@ -970,15 +970,17 @@ struct ContentView: View { @ViewBuilder func DynamicIslandFaceAnimation() -> some View { + let sideSize = max(0, vm.effectiveClosedNotchHeight - 12) HStack { HStack { Rectangle() .fill(.clear) - .frame(width: max(0, vm.effectiveClosedNotchHeight - 12), height: max(0, vm.effectiveClosedNotchHeight - 12)) + .frame(width: sideSize, height: sideSize) Rectangle() .fill(.black) .frame(width: vm.closedNotchSize.width - 20) IdleAnimationView() + .frame(width: sideSize, height: sideSize) } }.frame(height: vm.effectiveClosedNotchHeight + (isHovering ? 8 : 0), alignment: .center) } diff --git a/DynamicIsland/components/IdleAnimationView.swift b/DynamicIsland/components/IdleAnimationView.swift index 41015a9..01382cb 100644 --- a/DynamicIsland/components/IdleAnimationView.swift +++ b/DynamicIsland/components/IdleAnimationView.swift @@ -65,7 +65,6 @@ private struct AnimationContentView: View { .rotationEffect(.degrees(config.rotation)) .opacity(config.opacity) .padding(.bottom, config.paddingBottom) - .frame(width: config.expandWithAnimation ? nil : 30, height: 20) .clipped() case .lottieURL(let url): @@ -83,7 +82,6 @@ private struct AnimationContentView: View { .rotationEffect(.degrees(config.rotation)) .opacity(config.opacity) .padding(.bottom, config.paddingBottom) - .frame(width: config.expandWithAnimation ? nil : 30, height: 20) .clipped() } }