on xenial help sign in
bring back the long left edge drag
commit15e3d4546c4cf07e97d084df9a61d89cae31287d authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 13 Sep 2016, 14:23 (10 years ago) parenta2d71f1
4 files changed+20−3
qml/Shell.qml+1 qml/Stage/AbstractStage.qml+1−2 qml/Stage/Stage.qml+4 qml/Stage/StageMaths.qml+14−1
qml/Shell.qml+1
@@ -279,6 +279,7 @@ StyledItem {
279279
280280 dragAreaWidth: shell.edgeSize
281281 background: wallpaperResolver.background
282+ dragProgress: Math.max(0, (launcher.dragDistance * (stage.width - launcher.panelWidth) / stage.width) - launcher.panelWidth)
282283
283284 applicationManager: ApplicationManager
284285 topLevelSurfaceList: topLevelSurfaceList
qml/Stage/AbstractStage.qml+1−2
@@ -41,11 +41,10 @@ FocusScope {
4141 property int shellOrientationAngle
4242 property bool spreadEnabled: true // If false, animations and right edge will be disabled
4343 property bool suspended
44− // A Stage should paint a wallpaper etc over its full size but not use the margins for window placement
44+
4545 property int leftMargin: 0
4646 property bool oskEnabled: false
4747
48−
4948 // Shared code for use in stage implementations
5049 GSettings {
5150 id: lifecycleExceptions
qml/Stage/Stage.qml+4
@@ -447,6 +447,9 @@ AbstractStage {
447447 id: wallpaper
448448 anchors.fill: parent
449449 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
450453 }
451454
452455 Spread {
@@ -925,6 +928,7 @@ AbstractStage {
925928 sideStageX: sideStage.x
926929 itemIndex: appDelegate.itemIndex
927930 nextInStack: priv.nextInStack
931+ leftEdgeDragProgress: root.dragProgress
928932 }
929933
930934 StagedRightEdgeMaths {
qml/Stage/StageMaths.qml+14−1
@@ -12,6 +12,7 @@ QtObject {
1212 property int sideStageWidth: 0
1313 property int sideStageX: sceneWidth
1414 property bool animateX: false
15+ property int leftEdgeDragProgress: 0
1516
1617 property int stage: ApplicationInfoInterface.MainStage
1718 property var thisDelegate: null
@@ -25,6 +26,10 @@ QtObject {
2526 // of the last focused order.
2627 readonly property int itemZ: {
2728 // 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+
2833 if (!sideStageDelegate) return itemIndex;
2934
3035 // don't shuffle indexes greater than "actives or next"
@@ -57,7 +62,15 @@ QtObject {
5762 }
5863
5964
60− property int itemX: mainStageDelegate == thisDelegate ? 0 : sideStageDelegate == thisDelegate ? sideStageX : sceneWidth
65+ property int itemX: {
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+ }
6174 Behavior on itemX { enabled: root.animateX; UbuntuNumberAnimation {} }
6275
6376 readonly property int itemWidth: stage == ApplicationInfoInterface.MainStage ?