Commit df40a670 authored by Slawek Kaplonski's avatar Slawek Kaplonski Committed by Claudio Cambra
Browse files

Add animation to the "Now" button in the hourly views

If "Now" button is clicked in the Week view when we are in the
current week already, there is now scrolling animation added to
show clearly that view's time is changed.

Closes-Issue: #138
parent 26cffe6b
Pipeline #116376 passed with stage
in 9 minutes and 11 seconds
......@@ -631,6 +631,12 @@ Kirigami.Page {
return h;
}
NumberAnimation on QQC2.ScrollBar.vertical.position {
id: scrollAnimation
duration: Kirigami.Units.longDuration
easing.type: Easing.InOutQuad
}
function setToCurrentTime() {
if(currentTimeMarkerLoader.active) {
const viewHeight = (applicationWindow().height - applicationWindow().pageStack.globalToolBar.height - headerBottomSeparator.height - allDayHeader.height - headerTopSeparator.height - headingRow.height - Kirigami.Units.gridUnit);
......@@ -640,7 +646,8 @@ Kirigami.Page {
yPos = Math.max(0.0, yPos);
yPos = vScrollBar.size ? Math.min(vScrollBar.size, yPos) : Math.min(1.0, yPos);
vScrollBar.position = yPos;
scrollAnimation.to = yPos;
scrollAnimation.start();
}
}
......
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