Chat View Refinement
Nucleic-Session: 4E56990A-96AE-4597-9140-753CB82E769D Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -313,6 +313,25 @@ struct KeyboardDismissable: ViewModifier {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// A floating Liquid Glass surface for bars that hover over scrolling content (the session
|
||||||
|
/// chat bar, approval card). Real `glassEffect` on iOS 26; an ultra-thin material with a
|
||||||
|
/// hairline edge on earlier systems so the bar still reads as a translucent layer.
|
||||||
|
struct GlassSurface: ViewModifier {
|
||||||
|
var cornerRadius: CGFloat = 24
|
||||||
|
func body(content: Content) -> some View {
|
||||||
|
if #available(iOS 26.0, *) {
|
||||||
|
content.glassEffect(.regular, in: .rect(cornerRadius: cornerRadius, style: .continuous))
|
||||||
|
} else {
|
||||||
|
content
|
||||||
|
.background(.ultraThinMaterial,
|
||||||
|
in: RoundedRectangle(cornerRadius: cornerRadius, style: .continuous))
|
||||||
|
.overlay(
|
||||||
|
RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)
|
||||||
|
.strokeBorder(Color.primary.opacity(0.08), lineWidth: 1))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// A lifted card surface with a hairline border — the mobile echo of `AppTheme.surface`.
|
/// A lifted card surface with a hairline border — the mobile echo of `AppTheme.surface`.
|
||||||
struct CardBackground: ViewModifier {
|
struct CardBackground: ViewModifier {
|
||||||
var padding: CGFloat = 14
|
var padding: CGFloat = 14
|
||||||
|
|||||||
Reference in New Issue
Block a user