fixed missing period times in the ios widget ruler and unreadable tiles on tinted and clear home screens

A .systemLarge widget only gets ~27pt per period, below the 30pt threshold
shared with Android, so iOS now shows the times from 24pt with a tighter
cell. In non-full-color rendering modes the opaque tiles and the today
circle flattened into solid slabs hiding their text; they are drawn
translucent with an outline there and use the light-text palette.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-28 12:51:28 +02:00
co-authored by Claude Opus 5.5
parent f98a6979fb
commit 38a651f916
4 changed files with 45 additions and 9 deletions
@@ -4,6 +4,7 @@ import WidgetKit
struct TimetableWeekView: View {
let entry: TimetableEntry
@Environment(\.widgetPalette) private var palette
@Environment(\.widgetRenderingMode) private var renderingMode
var body: some View {
ZStack {
@@ -115,13 +116,23 @@ struct TimetableWeekView: View {
.lineLimit(1)
Text("\(Calendar.current.component(.day, from: day))")
.font(.system(size: 11, weight: isToday ? .bold : .regular))
.foregroundStyle(isToday ? palette.onAccent : palette.textPrimary)
.foregroundStyle(isToday ? todayNumberColor : palette.textPrimary)
.lineLimit(1)
.frame(width: 18, height: 18)
.background(Circle().fill(isToday ? palette.accent : Color.clear))
.background(Circle().fill(isToday ? todayCircleColor : Color.clear))
}
}
// An opaque accent circle flattens to the same shade as its number on
// tinted / clear home screens; keep the circle translucent there.
private var todayCircleColor: Color {
renderingMode == .fullColor ? palette.accent : Color.white.opacity(0.3)
}
private var todayNumberColor: Color {
renderingMode == .fullColor ? palette.onAccent : palette.textPrimary
}
private func placeholder(_ message: String) -> some View {
VStack(spacing: 4) {
Text("Marianum Stundenplan")