@@ -15,7 +15,8 @@
17import QtQuick 2.0
17import QtQuick 2.0
18−import Ubuntu.Components 0.1
18+import Ubuntu.Components 1.1
19+import Ubuntu.Components.Styles 1.1
19import Utils 0.1
20import Utils 0.1
20import Unity 0.2
21import Unity 0.2
21import Dash 0.1
22import Dash 0.1
@@ -496,6 +497,85 @@ FocusScope {
501+ id: pullToRefreshClippingRectangle
502+ anchors.left: parent.left
503+ anchors.right: parent.right
504+ anchors.bottom: parent.bottom
505+ height: parent.height - pullToRefresh.contentY + (pageHeaderLoader.item ? pageHeaderLoader.item.bottomItem[0].height - pageHeaderLoader.item.height : 0)
511+ objectName: "pullToRefresh"
512+ target: categoryView
514+ readonly property real contentY: categoryView.contentY - categoryView.originY
515+ y: -contentY - units.gu(5)
519+ scopeView.scope.refresh()
521+ anchors.left: parent.left
522+ anchors.right: parent.right
526+ onProcessingChanged: if (!scopeView.processing) pullToRefresh.refreshing = false
529+ style: PullToRefreshStyle {
530+ anchors.fill: parent
531+ activationThreshold: units.gu(14)
532+ releaseToRefresh: -pullToRefresh.contentY > activationThreshold
535+ target: categoryView
536+ onDraggingChanged: if (!categoryView.dragging && releaseToRefresh) pullToRefresh.refresh()
541+ anchors.horizontalCenter: parent.horizontalCenter
542+ horizontalAlignment: Text.AlignHCenter
543+ verticalAlignment: Text.AlignVCenter
547+ when: categoryView.dragging && !releaseToRefresh
548+ PropertyChanges { target: pullLabel; text: i18n.tr("Pull to refresh…") }
552+ when: categoryView.dragging && releaseToRefresh
553+ PropertyChanges { target: pullLabel; text: i18n.tr("Release to refresh…") }
556+ transitions: Transition {
557+ SequentialAnimation {
558+ UbuntuNumberAnimation {
567+ UbuntuNumberAnimation {
499 AbstractButton {
579 AbstractButton {
500 id: floatingSeeLess
580 id: floatingSeeLess
501 objectName: "floatingSeeLess"
581 objectName: "floatingSeeLess"