diff --git a/myApp/HaruDanim/Widgets/WidgetTheme.swift b/myApp/HaruDanim/Widgets/WidgetTheme.swift index 00eb605..97f8d02 100644 --- a/myApp/HaruDanim/Widgets/WidgetTheme.swift +++ b/myApp/HaruDanim/Widgets/WidgetTheme.swift @@ -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) } } }