From 8677051303b410608c363b8221b8fa77e61b7e19 Mon Sep 17 00:00:00 2001 From: jordi fita mas Date: Mon, 20 Jan 2025 11:09:07 +0100 Subject: [PATCH] =?UTF-8?q?Shift=20TimelineView=E2=80=99s=20items=20half?= =?UTF-8?q?=20a=20day?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They are supposed to show how many _nigths_ guests are staying in lodgins, thus they arrive at afternoon and leave at morning; the shift puts the starting position at midday. --- src/timelineview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timelineview.cpp b/src/timelineview.cpp index d157ebf..a0f051a 100644 --- a/src/timelineview.cpp +++ b/src/timelineview.cpp @@ -9,7 +9,7 @@ struct TimelineView::Item , day(day) { item->setParentItem(&view); - item->setPosition(QPointF(day * view.dayWidth(), 0.0)); + item->setPosition(QPointF(day * view.dayWidth() + view.dayWidth() / 2, 0.0)); item->setSize(QSizeF(len * view.dayWidth(), view.height())); item->setVisible(true); }