fix(widget): resolve white-on-white rendering bug in Liquid Glass and tinted themes

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013yKDMhuF39GVYy3FMcGHh7
This commit is contained in:
songyc macbook 2026-07-13 01:55:54 +09:00
parent 221dce1259
commit b897db47db

View File

@ -84,14 +84,24 @@ extension View {
/// ().
/// fullBleed = (ContainerRelativeShape)
/// /( )
/// white-on-white ,
/// ( 0.2 ).
struct WidgetCellBackground: View {
@Environment(\.widgetRenderingMode) private var renderingMode
var fullBleed = false
private var fill: AnyShapeStyle {
renderingMode == .fullColor
? AnyShapeStyle(AppTheme.surface)
: AnyShapeStyle(Color.white.opacity(0.14))
}
var body: some View {
if fullBleed {
ContainerRelativeShape().fill(AppTheme.surface)
ContainerRelativeShape().fill(fill)
} else {
RoundedRectangle(cornerRadius: 14, style: .continuous).fill(AppTheme.surface)
RoundedRectangle(cornerRadius: 14, style: .continuous).fill(fill)
}
}
}