Commit e4d9c137 authored by Claudio Cambra's avatar Claudio Cambra
Browse files

Increased minimum height of incidences in week view

parent ee87d0cf
Pipeline #96171 canceled with stage
......@@ -174,8 +174,8 @@ QVariantList HourlyIncidenceModel::layoutLines(const QDateTime &rowStart) const
: rowEnd;
// Need to convert ints into doubles to get more accurate starting positions
const auto start = ((startDT.time().hour() * 1.0) * (60.0 / mPeriodLength)) + ((startDT.time().minute() * 1.0) / mPeriodLength);
const auto duration =
qMax(getDuration(startDT, idx.data(IncidenceOccurrenceModel::EndTime).toDateTime().toTimeZone(QTimeZone::systemTimeZone()), mPeriodLength), 1.0);
const auto duration = // Give a minimum acceptable height or otherwise have unclickable incidence
qMax(getDuration(startDT, idx.data(IncidenceOccurrenceModel::EndTime).toDateTime().toTimeZone(QTimeZone::systemTimeZone()), mPeriodLength), 2.5);
const auto startMinutesFromDayStart = (startDT.time().hour() * 60) + startDT.time().minute();
const auto endMinutesFromDayStart = qMin((endDT.time().hour() * 60) + endDT.time().minute(), 24 * 60 * 60);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment