@@ -330,6 +330,87 @@ Item {
330 height: root.height
330 height: root.height
331 width: spreadView.width + Math.max(spreadView.width, ApplicationManager.count * spreadView.tileDistance)
331 width: spreadView.width + Math.max(spreadView.width, ApplicationManager.count * spreadView.tileDistance)
334+ id: sideStageBackground
336+ anchors.fill: parent
337+ anchors.leftMargin: spreadView.width - spreadView.sideStageWidth + spreadView.sideStageWidth * sideStageDragHandle.progress
338+ z: spreadView.indexToZIndex(priv.indexOf(priv.sideStageAppId))
339+ opacity: spreadView.phase == 0 ? 1 : 0
340+ Behavior on opacity { UbuntuNumberAnimation {} }
344+ id: sideStageDragHandle
345+ anchors { top: parent.top; bottom: parent.bottom; left: parent.left; leftMargin: spreadView.width - spreadView.sideStageWidth - width }
347+ z: sideStageBackground.z
348+ opacity: spreadView.phase <= 0 && spreadView.sideStageVisible ? 1 : 0
349+ property real progress: 0
350+ property bool dragging: false
352+ Behavior on opacity { UbuntuNumberAnimation {} }
356+ onSideStageVisibleChanged: {
357+ if (spreadView.sideStageVisible) {
358+ sideStageDragHandle.progress = 0;
364+ anchors.centerIn: parent
365+ anchors.horizontalCenterOffset: parent.progress * spreadView.sideStageWidth - (width - parent.width) / 2
366+ width: sideStageDragHandleMouseArea.pressed ? parent.width * 2 : parent.width
367+ height: parent.height
368+ source: "graphics/sidestage_handle@20.png"
369+ Behavior on width { UbuntuNumberAnimation {} }
373+ id: sideStageDragHandleMouseArea
374+ anchors.fill: parent
375+ enabled: spreadView.contentX == 0
377+ property var gesturePoints: new Array()
382+ sideStageDragHandle.progress = 0;
383+ sideStageDragHandle.dragging = true;
386+ if (priv.mainStageAppId) {
387+ sideStageDragHandle.progress = Math.max(0, (-startX + mouseX) / spreadView.sideStageWidth)
389+ gesturePoints.push(mouseX);
392+ if (priv.mainStageAppId) {
393+ var oneWayFlick = priv.evaluateOneWayFlick(gesturePoints);
394+ sideStageDragSnapAnimation.to = sideStageDragHandle.progress > 0.5 || oneWayFlick ? 1 : 0
395+ sideStageDragSnapAnimation.start();
397+ sideStageDragHandle.dragging = false;
401+ UbuntuNumberAnimation {
402+ id: sideStageDragSnapAnimation
403+ target: sideStageDragHandle
404+ property: "progress"
408+ sideStageDragHandle.dragging = false;
333 Repeater {
414 Repeater {
334 id: spreadRepeater
415 id: spreadRepeater
335 model: ApplicationManager
416 model: ApplicationManager
@@ -392,82 +473,11 @@ Item {
396− id: sideStageDragHandle
397− color: "transparent"
398− anchors { top: parent.top; bottom: parent.bottom; right: parent.right; rightMargin: spreadView.sideStageWidth }
400− opacity: spreadView.phase <= 0 && spreadView.sideStageVisible ? 1 : 0
401− property real progress: 0
402− property bool dragging: false
404− Behavior on opacity { UbuntuNumberAnimation {} }
408− onSideStageVisibleChanged: {
409− if (spreadView.sideStageVisible) {
410− sideStageDragHandle.progress = 0;
416− anchors.centerIn: parent
417− anchors.horizontalCenterOffset: parent.progress * spreadView.sideStageWidth - (width - parent.width) / 2
418− width: sideStageDragHandleMouseArea.pressed ? parent.width * 2 : parent.width
419− height: parent.height
420− source: "graphics/sidestage_handle@20.png"
421− Behavior on width { UbuntuNumberAnimation {} }
425− id: sideStageDragHandleMouseArea
426− anchors.fill: parent
427− enabled: spreadView.contentX == 0
429− property var gesturePoints: new Array()
434− sideStageDragHandle.progress = 0;
435− sideStageDragHandle.dragging = true;
438− if (priv.mainStageAppId) {
439− sideStageDragHandle.progress = Math.max(0, (-startX + mouseX) / spreadView.sideStageWidth)
441− gesturePoints.push(mouseX);
444− if (priv.mainStageAppId) {
445− var oneWayFlick = priv.evaluateOneWayFlick(gesturePoints);
446− sideStageDragSnapAnimation.to = sideStageDragHandle.progress > 0.5 || oneWayFlick ? 1 : 0
447− sideStageDragSnapAnimation.start();
449− sideStageDragHandle.dragging = false;
453− UbuntuNumberAnimation {
454− id: sideStageDragSnapAnimation
455− target: sideStageDragHandle
456− property: "progress"
460− sideStageDragHandle.dragging = false;
466 EdgeDragArea {
476 EdgeDragArea {
467 id: spreadDragArea
477 id: spreadDragArea
468− direction: Direction.Leftwards
469 anchors { top: parent.top; right: parent.right; bottom: parent.bottom }
478 anchors { top: parent.top; right: parent.right; bottom: parent.bottom }
470 width: root.dragAreaWidth
479 width: root.dragAreaWidth
480+ direction: Direction.Leftwards
472// Rectangle { anchors.fill: parent; color: "#4400FF00"}
482// Rectangle { anchors.fill: parent; color: "#4400FF00"}