~aacid/unity8/drag_with_quicklist

« back to all changes in this revision

Viewing changes to qml/Stages/DesktopStage.qml

  • Committer: CI Train Bot
  • Author(s): Daniel d'Andrada
  • Date: 2015-11-26 13:50:39 UTC
  • mfrom: (2056.1.4 mouseEdgePush)
  • Revision ID: ci-train-bot@canonical.com-20151126135039-y1bj8jp4mycez05f
Mouse has to push against edges to show launcher or apps spread

edge-barrier-sensitivity is the property that should show up in the System Settings GUI.

edge-barrier-min-push and edge-barrier-max-push are exposed in GSettings merely as a convenience so you can tweak those values without having to restart unity8. But they should NOT show up in system settings. Fixes: #1510969
Approved by: Michael Zanetti

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    // functions to be called from outside
31
31
    function updateFocusedAppOrientation() { /* TODO */ }
32
32
    function updateFocusedAppOrientationAnimated() { /* TODO */}
 
33
    function pushRightEdge(amount) {
 
34
        if (spread.state === "") {
 
35
            edgeBarrier.push(amount);
 
36
        }
 
37
    }
33
38
 
34
39
    mainApp: ApplicationManager.focusedApplicationId
35
40
            ? ApplicationManager.findApplication(ApplicationManager.focusedApplicationId)
471
476
        enabled: visible
472
477
    }
473
478
 
 
479
    EdgeBarrier {
 
480
        id: edgeBarrier
 
481
 
 
482
        // NB: it does its own positioning according to the specified edge
 
483
        edge: Qt.RightEdge
 
484
 
 
485
        onPassed: { spread.show(); }
 
486
        material: Component {
 
487
            Item {
 
488
                Rectangle {
 
489
                    width: parent.height
 
490
                    height: parent.width
 
491
                    rotation: 90
 
492
                    anchors.centerIn: parent
 
493
                    gradient: Gradient {
 
494
                        GradientStop { position: 0.0; color: Qt.rgba(0.16,0.16,0.16,0.7)}
 
495
                        GradientStop { position: 1.0; color: Qt.rgba(0.16,0.16,0.16,0)}
 
496
                    }
 
497
                }
 
498
            }
 
499
        }
 
500
    }
 
501
 
474
502
    DesktopSpread {
475
503
        id: spread
476
504
        objectName: "spread"