diff --git a/widgets/DapScrollView.qml b/widgets/DapScrollView.qml index dbdae693622704d6fc5739b33e605360277635be..e40db0902f95132148c487bffc7d7216605f9acf 100644 --- a/widgets/DapScrollView.qml +++ b/widgets/DapScrollView.qml @@ -4,12 +4,13 @@ DapScrollViewForm { property var contentPos: 0.0 - ////@ Connect to new ListView if changed - onViewDataChanged: { + // Connect to new ListView if changed + onViewDataChanged: + { viewData.contentYChanged.connect(updateY) } - ////@ Changes position of arrows when scroll + // Changes position of arrows when scroll function updateY() { if (viewData.atYBeginning) diff --git a/widgets/DapScrollViewForm.ui.qml b/widgets/DapScrollViewForm.ui.qml index 024a0ef545172807d1e7ca8b90f4eba7dccff394..39facaa64b463572a53517856870e7beeb862e37 100644 --- a/widgets/DapScrollViewForm.ui.qml +++ b/widgets/DapScrollViewForm.ui.qml @@ -3,13 +3,14 @@ import QtQuick 2.4 MouseArea { id: dapScrollMouseArea - ////@ Icons for Scroll Button - property string scrollDownButtonImageSource: "" - property string scrollDownButtonHoveredImageSource: "" - property string scrollUpButtonImageSource: "" - property string scrollUpButtonHoveredImageSource: "" - ////@ ListView to attach the ScrollButton - property ListView viewData: ListView {} + + // Icons for scroll button + property string scrollDownButtonImageSource + property string scrollDownButtonHoveredImageSource + property string scrollUpButtonImageSource + property string scrollUpButtonHoveredImageSource + //ListView to attach the scroll button + property ListView viewData property alias scrollMouseArea: dapScrollMouseArea property alias scrollButton: dapScrollButton property alias scrollButtonImage: dapScrollButtonImage