on xenial help sign in
clean up the long left edge swipe code to show the dash
commit1816c2e9da744e2158c3d98decc14cd2f68c87b4 authorMichael Zanetti <michael.zanetti@canonical.com> dateMon 14 Nov 2016, 17:48 (10 years ago) parent0f6f1bf
3 files changed+1−37
qml/Launcher/Launcher.qml−7 qml/Shell.qml−28 qml/Stage/Stage.qml+1−2
qml/Launcher/Launcher.qml−7
@@ -32,7 +32,6 @@ FocusScope {
3232
3333 property int panelWidth: units.gu(10)
3434 property int dragAreaWidth: units.gu(1)
35− property int minimizeDistance: units.gu(26)
3635 property real progress: dragArea.dragging && dragArea.touchPosition.x > panelWidth ?
3736 (width * (dragArea.touchPosition.x-panelWidth) / (width - panelWidth)) : 0
3837
@@ -49,9 +48,6 @@ FocusScope {
4948 // emitted when an application is selected
5049 signal launcherApplicationSelected(string appId)
5150
52− // emitted when the apps dash should be shown because of a swipe gesture
53− signal dash()
54−
5551 // emitted when the dash icon in the launcher has been tapped
5652 signal showDashHome()
5753
@@ -510,9 +506,6 @@ FocusScope {
510506 root.switchToNextState("drawer")
511507 } else {
512508 root.switchToNextState("visible")
513− if (distance > minimizeDistance) {
514− root.dash();
515− }
516509 }
517510 } else if (root.state === "") {
518511 // didn't drag far enough. rollback
qml/Shell.qml−28
@@ -308,7 +308,6 @@ StyledItem {
308308
309309 leftMargin: shell.usageScenario == "desktop" && !settings.autohideLauncher ? launcher.panelWidth: 0
310310 suspended: greeter.shown
311− keepDashRunning: launcher.shown || launcher.dashSwipe
312311 altTabPressed: physicalKeysMapper.altTabPressed
313312 oskEnabled: shell.oskEnabled
314313
@@ -435,18 +434,6 @@ StyledItem {
435434 }
436435 }
437436
438− function showDash() {
439− if (greeter.notifyShowingDashFromDrag()) {
440− launcher.fadeOut();
441− }
442−
443− if (!greeter.locked && tutorial.launcherLongSwipeEnabled
444− && ApplicationManager.focusedApplicationId != "unity8-dash") {
445− ApplicationManager.requestFocusApplication("unity8-dash")
446− launcher.fadeOut();
447− }
448− }
449−
450437 Item {
451438 id: overlay
452439 z: 10
@@ -496,15 +483,6 @@ StyledItem {
496483 id: launcher
497484 objectName: "launcher"
498485
499− /*
500− * Since the Dash doesn't have the same controll over surfaces that the
501− * Shell does, it can't slowly move the scope out of the way, as the shell
502− * does with apps, and the dash is show instantly. This allows for some
503− * leeway and prevents accidental home swipes.
504− */
505− readonly property real offset: shell.focusedApplicationId == "unity8-dash" ? units.gu(12) : 0
506− readonly property bool dashSwipe: progress > offset
507−
508486 anchors.top: parent.top
509487 anchors.topMargin: inverted ? 0 : panel.panelHeight
510488 anchors.bottom: parent.bottom
@@ -523,12 +501,6 @@ StyledItem {
523501 topPanelHeight: panel.panelHeight
524502
525503 onShowDashHome: showHome()
526− onDash: showDash()
527− onDashSwipeChanged: {
528− if (dashSwipe) {
529− dash.setCurrentScope(0, false, true)
530− }
531− }
532504 onLauncherApplicationSelected: {
533505 greeter.notifyUserRequestedApp();
534506 shell.activateApplication(appId);
qml/Stage/Stage.qml+1−2
@@ -36,7 +36,6 @@ FocusScope {
3636 property url background
3737 property int dragAreaWidth
3838 property bool interactive
39− property bool keepDashRunning: true
4039 property real nativeHeight
4140 property real nativeWidth
4241 property QtObject orientations
@@ -375,7 +374,7 @@ FocusScope {
375374 // in staged mode, when it switches to Windowed mode it will suddenly
376375 // resume all those apps at once. We might want to avoid that.
377376 value: root.mode === "windowed"
378− || (isDash && root.keepDashRunning)
377+ || isDash
379378 || (!root.suspended && model.application && priv.focusedAppDelegate &&
380379 (priv.focusedAppDelegate.appId === model.application.appId ||
381380 priv.mainStageAppId === model.application.appId ||