iOS: widget padding, week event limit, long-press day preview

- CalendarDayWidget: add 6pt top padding to header so content isn't flush
  against the widget edge
- ThisWeekWidget: increase per-day event cap from 6 to 8 to prevent "+1"
  overflow when there is vertical space available
- MonthView: add DayContextPreviewView to the long-press context menu using
  .contextMenu(menuItems:preview:); shows all-day events as colored bars
  with chevron continuation arrows, timed events as dot+time+title rows

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scarriffle
2026-06-11 20:15:53 +02:00
parent 69a32121df
commit 17ebf788ce
3 changed files with 143 additions and 3 deletions

View File

@@ -40,6 +40,7 @@ struct CalendarDayWidgetView: View {
let accent = Color(widgetHex: s.accentColorHex)
VStack(alignment: .leading, spacing: 0) {
header(primary: primary)
.padding(.top, 6)
weekStrip(snapshot: s, primary: primary, accent: accent)
.padding(.vertical, 3)
Rectangle()

View File

@@ -89,11 +89,11 @@ struct ThisWeekWidgetView: View {
.frame(width: 16, height: 16)
.background(isToday ? primary : Color.clear)
.clipShape(Circle())
ForEach(evs.prefix(6)) { ev in
ForEach(evs.prefix(8)) { ev in
eventPill(ev)
}
if evs.count > 6 {
Text("+\(evs.count - 6)")
if evs.count > 8 {
Text("+\(evs.count - 8)")
.font(.system(size: 6.5))
.foregroundStyle(accent)
}