mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Cap Liquid Glass Effect to 30FPS for reduced GPU throttling
This commit is contained in:
parent
5990fbac06
commit
850bdc592b
3 changed files with 4 additions and 4 deletions
|
|
@ -114,7 +114,7 @@ struct ExtensionLockScreenWidgetView: View {
|
|||
|
||||
@ViewBuilder
|
||||
private func liquidGlassBackground(shape: RoundedRectangle) -> some View {
|
||||
TimelineView(.animation) { context in
|
||||
TimelineView(.periodic(from: .now, by: 1.0 / 30.0)) { context in
|
||||
LiquidGlassBackground(variant: requestedLiquidGlassVariant, cornerRadius: descriptor.cornerRadius, trigger: context.date.timeIntervalSinceReferenceDate) {
|
||||
Color.black.opacity(0.08)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -781,7 +781,7 @@ struct LockScreenMusicPanel: View {
|
|||
|
||||
@ViewBuilder
|
||||
private var customLiquidPanelBackdrop: some View {
|
||||
TimelineView(.animation) { context in
|
||||
TimelineView(.periodic(from: .now, by: 1.0 / 30.0)) { context in
|
||||
LiquidGlassBackground(variant: musicGlassVariant, cornerRadius: panelCornerRadius, trigger: context.date.timeIntervalSinceReferenceDate) {
|
||||
Color.white.opacity(0.04)
|
||||
}
|
||||
|
|
@ -862,7 +862,7 @@ struct LockScreenMusicPanel: View {
|
|||
|
||||
@ViewBuilder
|
||||
private func customLiquidAlbumArtBackground(cornerRadius: CGFloat) -> some View {
|
||||
TimelineView(.animation) { context in
|
||||
TimelineView(.periodic(from: .now, by: 1.0 / 30.0)) { context in
|
||||
LiquidGlassBackground(variant: musicGlassVariant, cornerRadius: cornerRadius, trigger: context.date.timeIntervalSinceReferenceDate) {
|
||||
Color.clear
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ struct LockScreenTimerWidget: View {
|
|||
}
|
||||
|
||||
private var customLiquidBackground: some View {
|
||||
TimelineView(.animation) { context in
|
||||
TimelineView(.periodic(from: .now, by: 1.0 / 30.0)) { context in
|
||||
LiquidGlassBackground(variant: timerGlassVariant, cornerRadius: Self.cornerRadius, trigger: context.date.timeIntervalSinceReferenceDate) {
|
||||
Color.black.opacity(0.12)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue