@@ -16,6 +16,7 @@
17import QtQuick 2.0
17import QtQuick 2.0
18import Ubuntu.Components 0.1
18import Ubuntu.Components 0.1
19+import Ubuntu.Gestures 0.1
19import Unity 0.2
20import Unity 0.2
20import Utils 0.1
21import Utils 0.1
21import "../Components"
22import "../Components"
@@ -26,6 +27,7 @@ Item {
26 property var model: null
27 property var model: null
27 property var scopes: null
28 property var scopes: null
28 readonly property alias currentIndex: dashContentList.currentIndex
29 readonly property alias currentIndex: dashContentList.currentIndex
30+ property alias overviewHandleHeight: overviewDragHandle.height
30 signal scopeLoaded(string scopeId)
32 signal scopeLoaded(string scopeId)
31 signal gotoScope(string scopeId)
33 signal gotoScope(string scopeId)
@@ -38,9 +40,12 @@ Item {
38 Connections {
40 Connections {
39 target: scopes
41 target: scopes
40 onLoadedChanged: {
42 onLoadedChanged: {
41− if (scopes.loaded && set_current_index != undefined) {
44+ if (set_current_index != undefined) {
42− setCurrentScopeAtIndex(set_current_index[0], set_current_index[1], set_current_index[2]);
45+ setCurrentScopeAtIndex(set_current_index[0], set_current_index[1], set_current_index[2]);
43− set_current_index = undefined;
46+ set_current_index = undefined;
48+ scopesOverview.scope = scopes.getScope("scopesOverview");
@@ -80,11 +85,41 @@ Item {
80 dashContentList.currentItem.theScope.closeScope(scope)
85 dashContentList.currentItem.theScope.closeScope(scope)
89+ id: overviewController
91+ property bool accepted: false
92+ property bool enableAnimation: false
93+ property real progress: 0
99+ scope: scopes ? scopes.getScope("scopesOverview") : null
100+ progress: overviewController.progress
102+ overviewController.enableAnimation = true;
103+ overviewController.progress = 0;
104+ overviewController.accepted = false;
84 id: dashContentListHolder
109 id: dashContentListHolder
86 anchors.fill: parent
111 anchors.fill: parent
116+ anchors.fill: parent
117+ source: parent.width > parent.height ? "graphics/paper_landscape.png" : "graphics/paper_portrait.png"
118+ fillMode: Image.PreserveAspectCrop
119+ horizontalAlignment: Image.AlignRight
120+ verticalAlignment: Image.AlignTop
88 ListView {
123 ListView {
89 id: dashContentList
124 id: dashContentList
90 objectName: "dashContentList"
125 objectName: "dashContentList"
@@ -103,7 +138,7 @@ Item {
103 // TODO Investigate if we can switch to a smaller cache buffer when/if UbuntuShape gets more performant
138 // TODO Investigate if we can switch to a smaller cache buffer when/if UbuntuShape gets more performant
104 cacheBuffer: 1073741823
139 cacheBuffer: 1073741823
105 onMovementStarted: currentItem.item.showHeader();
140 onMovementStarted: currentItem.item.showHeader();
106− clip: parent.x != 0
141+ clip: parent.x != 0 || parent.scale != 1
108 // If the number of items is less than the current index, then need to reset to another item.
143 // If the number of items is less than the current index, then need to reset to another item.
109 onCountChanged: {
144 onCountChanged: {
@@ -161,5 +196,38 @@ Item {
161 Component.onDestruction: active = false
196 Component.onDestruction: active = false
200+ scale: 1 - overviewController.progress * 0.6
202+ id: dashContentScaleAnimation
203+ enabled: overviewController.enableAnimation
204+ UbuntuNumberAnimation { }
209+ id: overviewDragHandle
210+ direction: Direction.Upwards
211+ distanceThreshold: units.gu(20)
212+ enabled: !overviewController.accepted || dragging
214+ anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
217+ onSceneDistanceChanged: {
218+ overviewController.enableAnimation = false;
219+ overviewController.progress = Math.min(1, sceneDistance / distanceThreshold);
223+ if (status == DirectionalDragArea.Recognized) {
224+ overviewController.accepted = true;
228+ onDraggingChanged: {
229+ overviewController.enableAnimation = true;
230+ overviewController.progress = overviewController.accepted ? 1 : 0;