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:
parent
221dce1259
commit
b897db47db
@ -84,14 +84,24 @@ extension View {
|
|||||||
|
|
||||||
/// 셀 카드 배경 (표면색).
|
/// 셀 카드 배경 (표면색).
|
||||||
/// fullBleed = 셀 하나가 위젯 전체를 차지할 때 위젯 모서리(ContainerRelativeShape)에 맞춤
|
/// fullBleed = 셀 하나가 위젯 전체를 차지할 때 위젯 모서리(ContainerRelativeShape)에 맞춤
|
||||||
|
/// 틴트/클리어(리퀴드 글라스) 모드에서는 불투명 표면색이 흰 판으로 재해석돼 바이브런트
|
||||||
|
/// 콘텐츠와 겹치면 white-on-white가 되므로, 옅은 반투명 패널로 바꿔 시스템 유리 질감을
|
||||||
|
/// 살리면서 대비를 유지한다 (①의 틴트 셀 0.2 반투명 처리와 같은 원리).
|
||||||
struct WidgetCellBackground: View {
|
struct WidgetCellBackground: View {
|
||||||
|
@Environment(\.widgetRenderingMode) private var renderingMode
|
||||||
var fullBleed = false
|
var fullBleed = false
|
||||||
|
|
||||||
|
private var fill: AnyShapeStyle {
|
||||||
|
renderingMode == .fullColor
|
||||||
|
? AnyShapeStyle(AppTheme.surface)
|
||||||
|
: AnyShapeStyle(Color.white.opacity(0.14))
|
||||||
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
if fullBleed {
|
if fullBleed {
|
||||||
ContainerRelativeShape().fill(AppTheme.surface)
|
ContainerRelativeShape().fill(fill)
|
||||||
} else {
|
} else {
|
||||||
RoundedRectangle(cornerRadius: 14, style: .continuous).fill(AppTheme.surface)
|
RoundedRectangle(cornerRadius: 14, style: .continuous).fill(fill)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user