@@ -451,6 +451,7 @@ FocusScope {
451 PropertyChanges { target: cancelSpreadMouseArea; enabled: true }
451 PropertyChanges { target: cancelSpreadMouseArea; enabled: true }
452 PropertyChanges { target: blurLayer; visible: true; blurRadius: 32; brightness: .65; opacity: 1 }
452 PropertyChanges { target: blurLayer; visible: true; blurRadius: 32; brightness: .65; opacity: 1 }
453 PropertyChanges { target: wallpaper; visible: false }
453 PropertyChanges { target: wallpaper; visible: false }
454+ PropertyChanges { target: screensAndWorkspaces; opacity: 1 }
456 name: "stagedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "staged"
457 name: "stagedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "staged"
@@ -499,11 +500,13 @@ FocusScope {
499 from: "stagedRightEdge,sideStagedRightEdge,windowedRightEdge"; to: "spread"
500 from: "stagedRightEdge,sideStagedRightEdge,windowedRightEdge"; to: "spread"
500 PropertyAction { target: spreadItem; property: "highlightedIndex"; value: -1 }
501 PropertyAction { target: spreadItem; property: "highlightedIndex"; value: -1 }
501 PropertyAnimation { target: blurLayer; properties: "brightness,blurRadius"; duration: priv.animationDuration }
502 PropertyAnimation { target: blurLayer; properties: "brightness,blurRadius"; duration: priv.animationDuration }
503+ UbuntuNumberAnimation { target: screensAndWorkspaces; property: "opacity"; duration: priv.animationDuration }
503 Transition {
505 Transition {
504 to: "spread"
506 to: "spread"
505 PropertyAction { target: spreadItem; property: "highlightedIndex"; value: appRepeater.count > 1 ? 1 : 0 }
507 PropertyAction { target: spreadItem; property: "highlightedIndex"; value: appRepeater.count > 1 ? 1 : 0 }
506 PropertyAction { target: floatingFlickable; property: "contentX"; value: 0 }
508 PropertyAction { target: floatingFlickable; property: "contentX"; value: 0 }
509+ UbuntuNumberAnimation { target: screensAndWorkspaces; property: "opacity"; duration: priv.animationDuration }
508 Transition {
511 Transition {
509 from: "spread"
512 from: "spread"
@@ -565,6 +568,8 @@ FocusScope {
565 anchors { left: parent.left; top: parent.top; right: parent.right }
568 anchors { left: parent.left; top: parent.top; right: parent.right }
566 height: parent.height / 3
569 height: parent.height / 3
567 background: root.background
570 background: root.background
572+ visible: opacity > 0
@@ -579,6 +584,83 @@ FocusScope {
579 onLeaveSpread: {
584 onLeaveSpread: {
580 priv.goneToSpread = false;
585 priv.goneToSpread = false;
589+ id: floatingFlickable
590+ objectName: "spreadFlickable"
591+ anchors.fill: parent
593+ contentWidth: spreadItem.spreadTotalWidth
595+ function snap(toIndex) {
596+ var delegate = appRepeater.itemAt(toIndex)
597+ var targetContentX = floatingFlickable.contentWidth / spreadItem.totalItemCount * toIndex;
598+ if (targetContentX - floatingFlickable.contentX > spreadItem.rightStackXPos - (spreadItem.spreadItemWidth / 2)) {
599+ var offset = (spreadItem.rightStackXPos - (spreadItem.spreadItemWidth / 2)) - (targetContentX - floatingFlickable.contentX)
600+ snapAnimation.to = floatingFlickable.contentX - offset;
601+ snapAnimation.start();
602+ } else if (targetContentX - floatingFlickable.contentX < spreadItem.leftStackXPos + units.gu(1)) {
603+ var offset = (spreadItem.leftStackXPos + units.gu(1)) - (targetContentX - floatingFlickable.contentX);
604+ snapAnimation.to = floatingFlickable.contentX - offset;
605+ snapAnimation.start();
608+ UbuntuNumberAnimation {id: snapAnimation; target: floatingFlickable; property: "contentX"}
613+ objectName: "hoverMouseArea"
614+ anchors.fill: parent
615+ propagateComposedEvents: true
620+ property int scrollAreaWidth: width / 3
621+ property bool progressiveScrollingEnabled: false
624+ mouse.accepted = false
626+ if (hoverMouseArea.pressed) {
630+ // Find the hovered item and mark it active
631+ for (var i = appRepeater.count - 1; i >= 0; i--) {
632+ var appDelegate = appRepeater.itemAt(i);
633+ var mapped = mapToItem(appDelegate, hoverMouseArea.mouseX, hoverMouseArea.mouseY)
634+ var itemUnder = appDelegate.childAt(mapped.x, mapped.y);
635+ if (itemUnder && (itemUnder.objectName === "dragArea" || itemUnder.objectName === "windowInfoItem" || itemUnder.objectName == "closeMouseArea")) {
636+ spreadItem.highlightedIndex = i;
641+ if (floatingFlickable.contentWidth > floatingFlickable.width) {
642+ var margins = floatingFlickable.width * 0.05;
644+ if (!progressiveScrollingEnabled && mouseX < floatingFlickable.width - scrollAreaWidth) {
645+ progressiveScrollingEnabled = true
648+ // do we need to scroll?
649+ if (mouseX < scrollAreaWidth + margins) {
650+ var progress = Math.min(1, (scrollAreaWidth + margins - mouseX) / (scrollAreaWidth - margins));
651+ var contentX = (1 - progress) * (floatingFlickable.contentWidth - floatingFlickable.width)
652+ floatingFlickable.contentX = Math.max(0, Math.min(floatingFlickable.contentX, contentX))
654+ if (mouseX > floatingFlickable.width - scrollAreaWidth && progressiveScrollingEnabled) {
655+ var progress = Math.min(1, (mouseX - (floatingFlickable.width - scrollAreaWidth)) / (scrollAreaWidth - margins))
656+ var contentX = progress * (floatingFlickable.contentWidth - floatingFlickable.width)
657+ floatingFlickable.contentX = Math.min(floatingFlickable.contentWidth - floatingFlickable.width, Math.max(floatingFlickable.contentX, contentX))
662+ onPressed: mouse.accepted = false
584 Connections {
666 Connections {
@@ -1750,83 +1832,6 @@ FocusScope {
1755− objectName: "hoverMouseArea"
1756− anchors.fill: appContainer
1757− propagateComposedEvents: true
1762− property int scrollAreaWidth: width / 3
1763− property bool progressiveScrollingEnabled: false
1766− mouse.accepted = false
1768− if (hoverMouseArea.pressed) {
1772− // Find the hovered item and mark it active
1773− for (var i = appRepeater.count - 1; i >= 0; i--) {
1774− var appDelegate = appRepeater.itemAt(i);
1775− var mapped = mapToItem(appDelegate, hoverMouseArea.mouseX, hoverMouseArea.mouseY)
1776− var itemUnder = appDelegate.childAt(mapped.x, mapped.y);
1777− if (itemUnder && (itemUnder.objectName === "dragArea" || itemUnder.objectName === "windowInfoItem" || itemUnder.objectName == "closeMouseArea")) {
1778− spreadItem.highlightedIndex = i;
1783− if (floatingFlickable.contentWidth > floatingFlickable.width) {
1784− var margins = floatingFlickable.width * 0.05;
1786− if (!progressiveScrollingEnabled && mouseX < floatingFlickable.width - scrollAreaWidth) {
1787− progressiveScrollingEnabled = true
1790− // do we need to scroll?
1791− if (mouseX < scrollAreaWidth + margins) {
1792− var progress = Math.min(1, (scrollAreaWidth + margins - mouseX) / (scrollAreaWidth - margins));
1793− var contentX = (1 - progress) * (floatingFlickable.contentWidth - floatingFlickable.width)
1794− floatingFlickable.contentX = Math.max(0, Math.min(floatingFlickable.contentX, contentX))
1796− if (mouseX > floatingFlickable.width - scrollAreaWidth && progressiveScrollingEnabled) {
1797− var progress = Math.min(1, (mouseX - (floatingFlickable.width - scrollAreaWidth)) / (scrollAreaWidth - margins))
1798− var contentX = progress * (floatingFlickable.contentWidth - floatingFlickable.width)
1799− floatingFlickable.contentX = Math.min(floatingFlickable.contentWidth - floatingFlickable.width, Math.max(floatingFlickable.contentX, contentX))
1804− onPressed: mouse.accepted = false
1807− FloatingFlickable {
1808− id: floatingFlickable
1809− objectName: "spreadFlickable"
1810− anchors.fill: appContainer
1812− contentWidth: spreadItem.spreadTotalWidth
1814− function snap(toIndex) {
1815− var delegate = appRepeater.itemAt(toIndex)
1816− var targetContentX = floatingFlickable.contentWidth / spreadItem.totalItemCount * toIndex;
1817− if (targetContentX - floatingFlickable.contentX > spreadItem.rightStackXPos - (spreadItem.spreadItemWidth / 2)) {
1818− var offset = (spreadItem.rightStackXPos - (spreadItem.spreadItemWidth / 2)) - (targetContentX - floatingFlickable.contentX)
1819− snapAnimation.to = floatingFlickable.contentX - offset;
1820− snapAnimation.start();
1821− } else if (targetContentX - floatingFlickable.contentX < spreadItem.leftStackXPos + units.gu(1)) {
1822− var offset = (spreadItem.leftStackXPos + units.gu(1)) - (targetContentX - floatingFlickable.contentX);
1823− snapAnimation.to = floatingFlickable.contentX - offset;
1824− snapAnimation.start();
1827− UbuntuNumberAnimation {id: snapAnimation; target: floatingFlickable; property: "contentX"}
1830 PropertyAnimation {
1835 PropertyAnimation {
1831 id: shortRightEdgeSwipeAnimation
1836 id: shortRightEdgeSwipeAnimation
1832 property: "x"
1837 property: "x"