Commit 2dcdcfb4 authored by Claudio Cambra's avatar Claudio Cambra
Browse files

Fix errors about loader prop, time marker now appears correctly too

parent fcab4f9c
Pipeline #121763 passed with stage
in 5 minutes and 1 second
......@@ -656,7 +656,8 @@ Kirigami.Page {
const viewHeight = (applicationWindow().height - applicationWindow().pageStack.globalToolBar.height - headerBottomSeparator.height - allDayHeader.height - headerTopSeparator.height - headingRow.height - Kirigami.Units.gridUnit);
// Since we position with anchors, height is 0 -- must calc manually
let yPos = (currentTimeMarkerLoader.item.y / dayHeight) - ((viewHeight / 2) / dayHeight)
const timeMarkerY = (root.currentDate.getHours() * root.gridLineWidth) + (hourlyView.minuteHeight * root.minutesFromStartOfDay) - (height / 2) - (root.gridLineWidth / 2)
let yPos = (timeMarkerY / dayHeight) - ((viewHeight / 2) / dayHeight)
yPos = Math.max(0.0, yPos);
yPos = vScrollBar.size ? Math.min(vScrollBar.size, yPos) : Math.min(1.0, yPos);
......@@ -1120,6 +1121,7 @@ Kirigami.Page {
id: currentTimeMarkerLoader
active: root.currentDate >= viewLoader.startDate && viewLoader.daysFromWeekStart < root.daysToShow
sourceComponent: Rectangle {
id: currentTimeMarker
......
Supports Markdown
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