Touch: Add scroll decorator

This commit is contained in:
Thomas Perl 2014-02-04 23:38:58 +01:00
parent 84dc9cbf01
commit 34c37870a9
5 changed files with 44 additions and 0 deletions

View file

@ -59,5 +59,7 @@ SlidePage {
}
}
}
PScrollDecorator { flickable: flickable }
}

View file

@ -28,5 +28,7 @@ ListView {
property string title
header: SlidePageHeader { title: pListView.title }
PScrollDecorator { flickable: pListView }
}

View file

@ -0,0 +1,34 @@
/**
*
* gPodder QML UI Reference Implementation
* Copyright (c) 2013, Thomas Perl <m@thp.io>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*
*/
import QtQuick 2.0
Rectangle {
property var flickable
x: flickable.width - width
y: flickable.visibleArea.yPosition * flickable.height
width: 5 * pgst.scalef
height: flickable.visibleArea.heightRatio * flickable.height
visible: flickable.visibleArea.heightRatio < 1
color: '#ffffff'
opacity: flickable.moving ? .2 : 0
Behavior on opacity { PropertyAnimation { duration: 100 } }
}

View file

@ -117,4 +117,6 @@ SlidePage {
}
}
}
PScrollDecorator { flickable: flickable }
}

View file

@ -43,6 +43,8 @@ SlidePage {
}
Flickable {
id: flickable
Connections {
target: py
onReadyChanged: {
@ -235,5 +237,7 @@ SlidePage {
}
}
}
PScrollDecorator { flickable: flickable }
}