mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Update Liquid glass
This commit is contained in:
parent
1eb20577ff
commit
4b9fedf86e
2 changed files with 27 additions and 1 deletions
|
|
@ -10992,6 +10992,10 @@
|
||||||
},
|
},
|
||||||
"Lock Screen Integration" : {
|
"Lock Screen Integration" : {
|
||||||
|
|
||||||
|
},
|
||||||
|
"Lock Screen Liquid Glass" : {
|
||||||
|
"comment" : "The title of the music panel on the lock screen.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
},
|
},
|
||||||
"Lock screen panel preview" : {
|
"Lock screen panel preview" : {
|
||||||
"comment" : "A description of the content displayed in the lock screen panel.",
|
"comment" : "A description of the content displayed in the lock screen panel.",
|
||||||
|
|
|
||||||
|
|
@ -715,7 +715,7 @@ struct LockScreenMusicPanel: View {
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
private var liquidPanelBackdrop: some View {
|
private var liquidPanelBackdrop: some View {
|
||||||
if #available(macOS 26.0, *) {
|
if #available(macOS 26.0, *) {
|
||||||
clearLiquidGlassSurface(cornerRadius: panelCornerRadius)
|
GlassTextBackdrop(cornerRadius: panelCornerRadius)
|
||||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
.allowsHitTesting(false)
|
.allowsHitTesting(false)
|
||||||
.accessibilityHidden(true)
|
.accessibilityHidden(true)
|
||||||
|
|
@ -950,3 +950,25 @@ private struct PanelControlButton: View {
|
||||||
case counterClockwise
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue