Skip to content
Snippets Groups Projects
Commit 78be4677 authored by Kirill Anisimov's avatar Kirill Anisimov
Browse files

Fixed Scroll Button behavour during scroll.

parent dd0a34eb
No related branches found
No related tags found
1 merge request!18Features 2923
This commit is part of merge request !18. Comments created here will be created in the context of that merge request.
......@@ -3,7 +3,14 @@ import QtQuick 2.4
DapScrollViewForm
{
property var contentPos: 0.0
viewData.onContentYChanged:
////@ Connect to new ListView if changed
onViewDataChanged: {
viewData.contentYChanged.connect(updateY)
}
////@ Changes position of arrows when scroll
function updateY()
{
if (viewData.atYBeginning)
{
......@@ -13,7 +20,7 @@ DapScrollViewForm
{
scrollButton.state = "goDown"
}
else if (contentPos < viewData.contentItem.y)
else if (contentPos > viewData.contentItem.y)
{
scrollButton.state = "goUp"
}
......@@ -21,6 +28,7 @@ DapScrollViewForm
{
scrollButton.state = "goDown"
}
contentPos = viewData.contentItem.y
}
onEntered:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment