repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

caldav: multi-day event band overlay on the calendar grid

67daa5834482b9382c88d2ac025c299725ac64df

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Wrap the grid in a plain Item with a sibling band overlay (Task 8) — not
reparented into the Grid positioner, which would lay bands out as cells.
bandLayout runs Ical.buildSegments over caldavService.events; each segment
is a thin lane-stacked bar, pitch 32 (cell 30 + spacing 2), rounded only
on its true start/end corners so week-wrapped spans read continuous.
Verified live: real Tue-Thu multi-day events render, week-boundary split
and per-corner radii correct.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Changed files (1)

+52 / −8 text lines

Diff layout

quickshell/nuguland/PopoutHost.qml

Modified

+52 / −8 text lines

285285 return map;
286286 }
288 // multi-day events as week-split band segments (Ical.buildSegments)
289 readonly property var bandLayout: {
290 const gs = root.caldavService ? root.caldavService.gridStartDate() : null;
291 if (!gs)
292 return { "segments": [], "laneCount": 0 };
293 return Ical.buildSegments(caldavEvents || [], gs);
294 }
288296 spacing: 8
289297 width: parent ? parent.width : 0
323331 }
325 Grid {
326 objectName: "calendar-grid"
327 columns: 7
328 spacing: 2
333 Item {
334 width: monthGrid.width
335 height: monthGrid.height
330 Repeater {
331 model: clockCol.days
337 Grid {
338 id: monthGrid
333 Item {
334 id: cell
340 objectName: "calendar-grid"
341 columns: 7
342 spacing: 2
344 Repeater {
345 model: clockCol.days
347 Item {
348 id: cell
336350 readonly property var markers: clockCol.eventsByDate[modelData.iso] || []
382396 }
398 }
400 }
402 }
404 // multi-day band overlay: thin lane-stacked bars over the grid.
405 // pitch matches cell (30) + spacing (2) = 32; bands sit near
406 // the cell bottom, stacking upward per lane.
407 Item {
408 anchors.fill: monthGrid
409 z: 2
411 Repeater {
412 model: clockCol.bandLayout.segments
414 Rectangle {
415 readonly property var seg: modelData
417 x: seg.colStart * 32
418 y: seg.row * 32 + 23 - seg.lane * 7
419 width: (seg.colEnd - seg.colStart + 1) * 32 - 2
420 height: 5
421 color: Qt.alpha(seg.color, 0.9)
422 topLeftRadius: seg.roundLeft ? 2.5 : 0
423 bottomLeftRadius: seg.roundLeft ? 2.5 : 0
424 topRightRadius: seg.roundRight ? 2.5 : 0
425 bottomRightRadius: seg.roundRight ? 2.5 : 0
426 }
384428 }
386430 }