Update Liquid glass

This commit is contained in:
Hariharan Mudaliar 2025-12-19 23:09:38 +05:30
commit 4b9fedf86e
No known key found for this signature in database
GPG key ID: 025583EB0BE5640E
2 changed files with 27 additions and 1 deletions

View file

@ -10992,6 +10992,10 @@
},
"Lock Screen Integration" : {
},
"Lock Screen Liquid Glass" : {
"comment" : "The title of the music panel on the lock screen.",
"isCommentAutoGenerated" : true
},
"Lock screen panel preview" : {
"comment" : "A description of the content displayed in the lock screen panel.",

View file

@ -715,7 +715,7 @@ struct LockScreenMusicPanel: View {
@ViewBuilder
private var liquidPanelBackdrop: some View {
if #available(macOS 26.0, *) {
clearLiquidGlassSurface(cornerRadius: panelCornerRadius)
GlassTextBackdrop(cornerRadius: panelCornerRadius)
.frame(maxWidth: .infinity, maxHeight: .infinity)
.allowsHitTesting(false)
.accessibilityHidden(true)
@ -950,3 +950,25 @@ private struct PanelControlButton: View {
case counterClockwise
}
}
@available(macOS 26.0, *)
private struct GlassTextBackdrop: View {
let cornerRadius: CGFloat
var body: some View {
GeometryReader { proxy in
let dynamicFontSize = max(min(proxy.size.width, proxy.size.height) / 8, 42)
Text("Lock Screen Liquid Glass")
.font(.system(size: dynamicFontSize, weight: .semibold, design: .rounded))
.foregroundStyle(Color.clear)
.frame(width: proxy.size.width, height: proxy.size.height)
.glassEffect(
.clear.interactive(),
in: .rect(cornerRadius: cornerRadius)
)
}
.allowsHitTesting(false)
.accessibilityHidden(true)
}
}