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:
parent
ed56ba543d
commit
2ba3167d10
|
@ -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"
|
||||||
|
|
Loading…
Reference in New Issue