Shift TimelineView’s items half a day
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.
This commit is contained in:
parent
b9c68f4b76
commit
8677051303
|
@ -9,7 +9,7 @@ struct TimelineView::Item
|
||||||
, day(day)
|
, day(day)
|
||||||
{
|
{
|
||||||
item->setParentItem(&view);
|
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->setSize(QSizeF(len * view.dayWidth(), view.height()));
|
||||||
item->setVisible(true);
|
item->setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue