On a tinted/transparent (or iOS 18 accented) home screen, the Action Run widget turned into a solid white block with invisible content, while the other widgets rendered fine. Cause: only the Action Run cell paints an opaque tag-color background (WidgetTintedCellBackground) with hardcoded .foregroundStyle(.white) text on top. In any non-.fullColor rendering mode the system re-interprets that opaque fill toward white and the white text disappears — classic white-on-white. The other widgets already use the adaptive AppTheme.surface plus semantic .primary/.secondary text, which is why they were unaffected. Fix, confined to ActionRunCellView: - Read @Environment(\.widgetRenderingMode). In .fullColor keep the tag-color fill + white text (unchanged). In accented/vibrant, drop the opaque fill to a faint translucent tint and render content with the semantic .primary color so the system's tint keeps a clear foreground/background contrast. - No hardcoded .white survives on the tinted path; the container background is still owned by widgetAppTheme()'s .containerBackground(for: .widget) (clear in non-fullColor so the system glass shows through), so this composes safely with iOS 18 home-screen customization. The Live Activity's white-on-tint icon (HaruDanimWidgets) is intentionally left as-is — Live Activities always render full color and aren't subject to home-screen widgetRenderingMode. Verified in the in-app widget preview with a new DEBUG affordance (-widgetRenderMode accented|vibrant, added to WidgetPreviewScreen): forcing accented mode, the Action Run cells now show legible dark icons/labels/values on a faint tint instead of blank white. Build succeeds. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013yKDMhuF39GVYy3FMcGHh7
Description
This is a repository where I have collected my study codes, project codes I have worked on so far, and setting files.
Languages
Swift
78.6%
Python
6.7%
C
6%
Java
4.4%
TypeScript
3%
Other
1.3%