mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Atoll: Center notch after leaving minimalist mode and enlarge idle animation
- Also remove fixed viewports for inactive animations Signed-off-by: Jis G Jacob <studiokeys@blissroms.org>
This commit is contained in:
parent
3684802398
commit
393cc558d6
2 changed files with 4 additions and 4 deletions
|
|
@ -546,7 +546,7 @@ struct ContentView: View {
|
||||||
maxHeight: dynamicNotchSize.height + currentShadowPadding + (isDynamicIslandMode ? dynamicIslandTopOffset : 0),
|
maxHeight: dynamicNotchSize.height + currentShadowPadding + (isDynamicIslandMode ? dynamicIslandTopOffset : 0),
|
||||||
alignment: .top
|
alignment: .top
|
||||||
)
|
)
|
||||||
.frame(maxHeight: .infinity, alignment: .top)
|
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .top)
|
||||||
.environmentObject(privacyManager)
|
.environmentObject(privacyManager)
|
||||||
.background(dragDetector)
|
.background(dragDetector)
|
||||||
.environmentObject(vm)
|
.environmentObject(vm)
|
||||||
|
|
@ -970,15 +970,17 @@ struct ContentView: View {
|
||||||
|
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
func DynamicIslandFaceAnimation() -> some View {
|
func DynamicIslandFaceAnimation() -> some View {
|
||||||
|
let sideSize = max(0, vm.effectiveClosedNotchHeight - 12)
|
||||||
HStack {
|
HStack {
|
||||||
HStack {
|
HStack {
|
||||||
Rectangle()
|
Rectangle()
|
||||||
.fill(.clear)
|
.fill(.clear)
|
||||||
.frame(width: max(0, vm.effectiveClosedNotchHeight - 12), height: max(0, vm.effectiveClosedNotchHeight - 12))
|
.frame(width: sideSize, height: sideSize)
|
||||||
Rectangle()
|
Rectangle()
|
||||||
.fill(.black)
|
.fill(.black)
|
||||||
.frame(width: vm.closedNotchSize.width - 20)
|
.frame(width: vm.closedNotchSize.width - 20)
|
||||||
IdleAnimationView()
|
IdleAnimationView()
|
||||||
|
.frame(width: sideSize, height: sideSize)
|
||||||
}
|
}
|
||||||
}.frame(height: vm.effectiveClosedNotchHeight + (isHovering ? 8 : 0), alignment: .center)
|
}.frame(height: vm.effectiveClosedNotchHeight + (isHovering ? 8 : 0), alignment: .center)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,6 @@ private struct AnimationContentView: View {
|
||||||
.rotationEffect(.degrees(config.rotation))
|
.rotationEffect(.degrees(config.rotation))
|
||||||
.opacity(config.opacity)
|
.opacity(config.opacity)
|
||||||
.padding(.bottom, config.paddingBottom)
|
.padding(.bottom, config.paddingBottom)
|
||||||
.frame(width: config.expandWithAnimation ? nil : 30, height: 20)
|
|
||||||
.clipped()
|
.clipped()
|
||||||
|
|
||||||
case .lottieURL(let url):
|
case .lottieURL(let url):
|
||||||
|
|
@ -83,7 +82,6 @@ private struct AnimationContentView: View {
|
||||||
.rotationEffect(.degrees(config.rotation))
|
.rotationEffect(.degrees(config.rotation))
|
||||||
.opacity(config.opacity)
|
.opacity(config.opacity)
|
||||||
.padding(.bottom, config.paddingBottom)
|
.padding(.bottom, config.paddingBottom)
|
||||||
.frame(width: config.expandWithAnimation ? nil : 30, height: 20)
|
|
||||||
.clipped()
|
.clipped()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue