on xenial help sign in
Fix long left being disabled; fix timers continuing while greeter is up; fix left timer starting on startup
commitcefe23140e29df7344ed209e91825f5bfdbb1b95 authorMichael Terry <michael.terry@canonical.com> dateFri 29 Apr 2016, 11:12 (10 years ago) parent2a8361d
5 files changed+20−8
qml/Notifications/Notifications.qml+1 qml/Shell.qml+5−4 qml/Tutorial/InactivityTimer.qml+9−1 qml/Tutorial/TutorialContent.qml+2−2 qml/Tutorial/TutorialLeftLong.qml+3−1
qml/Notifications/Notifications.qml+1
@@ -26,6 +26,7 @@ ListView {
2626 objectName: "notificationList"
2727 interactive: false
2828
29+ readonly property bool hasNotification: count > 1 // placeholder is index 0
2930 property real margin
3031 property bool useModal: snapDecisionProxyModel.count > 0
3132 property bool hasMouse
qml/Shell.qml+5−4
@@ -312,7 +312,7 @@ Item {
312312 Binding {
313313 target: applicationsDisplayLoader.item
314314 property: "inverseProgress"
315− value: greeter && greeter.locked ? 0 : launcher.progress
315+ value: !greeter || greeter.locked || !tutorial.launcherLongSwipeEnabled ? 0 : launcher.progress
316316 }
317317 Binding {
318318 target: applicationsDisplayLoader.item
@@ -616,9 +616,10 @@ Item {
616616 objectName: "tutorial"
617617 anchors.fill: parent
618618
619− paused: callManager.hasCalls || greeter.shown
620− delayed: dialogs.hasActiveDialog || notifications.count > 0 ||
621− inputMethod.state === "shown"
619+ paused: callManager.hasCalls || !greeter || greeter.shown
620+ delayed: dialogs.hasActiveDialog || notifications.hasNotification ||
621+ inputMethod.state === "shown" || launcher.shown ||
622+ panel.indicators.shown
622623 usageScenario: shell.usageScenario
623624 lastInputTimestamp: inputFilter.lastInputTimestamp
624625 launcher: launcher
qml/Tutorial/InactivityTimer.qml+9−1
@@ -26,7 +26,9 @@ Item {
2626 property int lastInputTimestamp
2727
2828 function start() {
29− delayTimer.start();
29+ if (!delayTimer.running && !inactivityTimer.running) {
30+ delayTimer.start();
31+ }
3032 }
3133
3234 ////
@@ -44,6 +46,12 @@ Item {
4446 inactivityTimer.restart();
4547 }
4648 }
49+ onPausedChanged: {
50+ if (root.paused) {
51+ delayTimer.stop();
52+ inactivityTimer.stop();
53+ }
54+ }
4755 }
4856
4957 Timer {
qml/Tutorial/TutorialContent.qml+2−2
@@ -26,8 +26,8 @@ Item {
2626 property Item panel
2727 property Item stage
2828 property string usageScenario
29− property bool paused
30− property bool delayed
29+ property bool paused: true // default to true so that we won't start until top level is all ready
30+ property bool delayed: true // same
3131 property var lastInputTimestamp
3232
3333 readonly property bool launcherEnabled: !running
qml/Tutorial/TutorialLeftLong.qml+3−1
@@ -23,7 +23,9 @@ TutorialPage {
2323
2424 property var launcher
2525
26− opacityOverride: 1 - launcher.dragDistance / launcher.minimizeDistance
26+ // Unlike other tutorials, this one can't be skipped before we show it, so
27+ // only set opacityOverride if we're already shown.
28+ opacityOverride: shown ? 1 - launcher.dragDistance / launcher.minimizeDistance : 1
2729
2830 mouseArea {
2931 anchors.leftMargin: launcher.dragAreaWidth