Update LiquidGlassBackground to remove polling

This commit is contained in:
Hariharan Mudaliar 2026-02-22 13:34:03 +05:30
commit 1d6cdf866a
No known key found for this signature in database
GPG key ID: 025583EB0BE5640E
8 changed files with 145 additions and 59 deletions

View file

@ -265,14 +265,11 @@ struct VerticalHUDView: View {
case .liquid:
if #available(macOS 26.0, *) {
if verticalHUDLiquidGlassCustomizationMode == .customLiquid {
TimelineView(.periodic(from: .now, by: 1.0 / 30.0)) { context in
LiquidGlassBackground(
variant: verticalHUDLiquidGlassVariant,
cornerRadius: max(currentWidth, hudWidth),
trigger: context.date.timeIntervalSinceReferenceDate
) {
Color.white.opacity(0.04)
}
LiquidGlassBackground(
variant: verticalHUDLiquidGlassVariant,
cornerRadius: max(currentWidth, hudWidth)
) {
Color.white.opacity(0.04)
}
} else {
Capsule()