Fix off-by-one error in TimelineView’s implicit width

QDate("2025-01-01").daysTo(QDate("2025-01-01")) returns 1, but the width
should be for two days, because the view shows the last day too.
This commit is contained in:
jordi fita mas 2025-01-15 14:29:28 +01:00
parent ed56ba543d
commit 2ba3167d10
1 changed files with 1 additions and 1 deletions

View File

@ -288,7 +288,7 @@ void TimelineView::populate()
void TimelineView::updateImplicitWidth() void TimelineView::updateImplicitWidth()
{ {
setImplicitWidth(m_dayWidth * m_fromDate.daysTo(m_toDate)); setImplicitWidth(m_dayWidth * (m_fromDate.daysTo(m_toDate) + 1));
} }
#include "moc_timelineview.cpp" #include "moc_timelineview.cpp"