on xenial help sign in
bring back the long left edge drag
15e3d45Michael Zanetti
qml/Shell.qml+1
@@ -279,6 +279,7 @@ StyledItem {
279
279
280 dragAreaWidth: shell.edgeSize
280 dragAreaWidth: shell.edgeSize
281 background: wallpaperResolver.background
281 background: wallpaperResolver.background
282+ dragProgress: Math.max(0, (launcher.dragDistance * (stage.width - launcher.panelWidth) / stage.width) - launcher.panelWidth)
282
283
283 applicationManager: ApplicationManager
284 applicationManager: ApplicationManager
284 topLevelSurfaceList: topLevelSurfaceList
285 topLevelSurfaceList: topLevelSurfaceList
qml/Stage/AbstractStage.qml+1−2
@@ -41,11 +41,10 @@ FocusScope {
41 property int shellOrientationAngle
41 property int shellOrientationAngle
42 property bool spreadEnabled: true // If false, animations and right edge will be disabled
42 property bool spreadEnabled: true // If false, animations and right edge will be disabled
43 property bool suspended
43 property bool suspended
44− // A Stage should paint a wallpaper etc over its full size but not use the margins for window placement
44+
45 property int leftMargin: 0
45 property int leftMargin: 0
46 property bool oskEnabled: false
46 property bool oskEnabled: false
47
47
48−
49 // Shared code for use in stage implementations
48 // Shared code for use in stage implementations
50 GSettings {
49 GSettings {
51 id: lifecycleExceptions
50 id: lifecycleExceptions
qml/Stage/Stage.qml+4
@@ -447,6 +447,9 @@ AbstractStage {
447 id: wallpaper
447 id: wallpaper
448 anchors.fill: parent
448 anchors.fill: parent
449 source: root.background
449 source: root.background
450+ // Make sure it's the lowest item. Due to the left edge drag we sometimes need
451+ // to put the dash at -1 and we don't want it behind the Wallpaper
452+ z: -2
450 }
453 }
451
454
452 Spread {
455 Spread {
@@ -925,6 +928,7 @@ AbstractStage {
925 sideStageX: sideStage.x
928 sideStageX: sideStage.x
926 itemIndex: appDelegate.itemIndex
929 itemIndex: appDelegate.itemIndex
927 nextInStack: priv.nextInStack
930 nextInStack: priv.nextInStack
931+ leftEdgeDragProgress: root.dragProgress
928 }
932 }
929
933
930 StagedRightEdgeMaths {
934 StagedRightEdgeMaths {
qml/Stage/StageMaths.qml+14−1
@@ -12,6 +12,7 @@ QtObject {
12 property int sideStageWidth: 0
12 property int sideStageWidth: 0
13 property int sideStageX: sceneWidth
13 property int sideStageX: sceneWidth
14 property bool animateX: false
14 property bool animateX: false
15+ property int leftEdgeDragProgress: 0
15
16
16 property int stage: ApplicationInfoInterface.MainStage
17 property int stage: ApplicationInfoInterface.MainStage
17 property var thisDelegate: null
18 property var thisDelegate: null
@@ -25,6 +26,10 @@ QtObject {
25 // of the last focused order.
26 // of the last focused order.
26 readonly property int itemZ: {
27 readonly property int itemZ: {
27 // only shuffle when we've got a main and side stage
28 // only shuffle when we've got a main and side stage
29+ if (thisDelegate.isDash && thisDelegate != mainStageDelegate) {
30+ return -1; // Keep the dash behind all other apps for the left edge gesture
31+ }
32+
28 if (!sideStageDelegate) return itemIndex;
33 if (!sideStageDelegate) return itemIndex;
29
34
30 // don't shuffle indexes greater than "actives or next"
35 // don't shuffle indexes greater than "actives or next"
@@ -57,7 +62,15 @@ QtObject {
57 }
62 }
58
63
59
64
65+ property int itemX: {
60− property int itemX: mainStageDelegate == thisDelegate ? 0 : sideStageDelegate == thisDelegate ? sideStageX : sceneWidth
66+ if (mainStageDelegate == thisDelegate) {
67+ return thisDelegate.isDash ? 0 : leftEdgeDragProgress;
68+ }
69+ if (sideStageDelegate == thisDelegate) {
70+ return sideStageX;
71+ }
72+ return thisDelegate.isDash ? 0 : sceneWidth;
73+ }
61 Behavior on itemX { enabled: root.animateX; UbuntuNumberAnimation {} }
74 Behavior on itemX { enabled: root.animateX; UbuntuNumberAnimation {} }
62
75
63 readonly property int itemWidth: stage == ApplicationInfoInterface.MainStage ?
76 readonly property int itemWidth: stage == ApplicationInfoInterface.MainStage ?