on xenial help sign in
fixes
commit851c4624fc08afd7e3e443a792deab87714d052d authorMichael Zanetti <michael.zanetti@canonical.com> dateMon 1 Aug 2016, 22:02 (10 years ago) parent92f2448
2 files changed+25−9
qml/Components/VirtualTouchPad.qml+24−9 src/ShellApplication.cpp+1
qml/Components/VirtualTouchPad.qml+24−9
@@ -29,8 +29,30 @@ Item {
2929 Component.onDestruction: removeMouse();
3030 }
3131
32+ Component.onCompleted: {
33+ if (!inputMethodState.touchpadTutorialHasRun) {
34+ root.runTutorial()
35+ }
36+ }
37+
3238 function runTutorial() {
33− tutorial.start()
39+ // If the tutorial animation is started too early, e.g. in Component.onCompleted,
40+ // root width & height might be reported as 0x0 still. As animations read their
41+ // values at startup and won't update them, lets make sure to only start once
42+ // we have some actual size.
43+ if (root.width > 0 && root.height > 0) {
44+ tutorial.start();
45+ } else {
46+ tutorialTimer.start();
47+ }
48+ }
49+
50+ Timer {
51+ id: tutorialTimer
52+ interval: 50
53+ repeat: false
54+ running: false
55+ onTriggered: root.runTutorial();
3456 }
3557
3658 readonly property bool pressed: point1.pressed || point2.pressed || leftButton.pressed || rightButton.pressed
@@ -42,12 +64,6 @@ Item {
4264 property bool oskEnabled: true
4365 }
4466
45− Component.onCompleted: {
46− if (!inputMethodState.touchpadTutorialHasRun) {
47− tutorial.start();
48− }
49− }
50−
5167 MultiPointTouchArea {
5268 objectName: "touchPadArea"
5369 anchors.fill: parent
@@ -229,7 +245,7 @@ Item {
229245 InputMethod {
230246 id: inputMethod
231247 // Don't resize when there is only one screen to avoid resize clashing with the InputMethod in the Shell.
232− enabled: screens.count > 1 && inputMethodState.oskEnabled
248+ enabled: screens.count > 1 && inputMethodState.oskEnabled && !tutorial.running
233249 objectName: "inputMethod"
234250 anchors.fill: parent
235251 }
@@ -294,7 +310,6 @@ Item {
294310 PauseAnimation { duration: 100 } // it takes a bit until pausing actually takes effect
295311 UbuntuNumberAnimation { targets: [tutorialLabel, tutorialImage]; property: "opacity"; to: 0; duration: UbuntuAnimation.FastDuration }
296312
297− PauseAnimation { duration: UbuntuAnimation.SleepyDuration }
298313 UbuntuNumberAnimation { target: leftButton; property: "opacity"; to: 1 }
299314 UbuntuNumberAnimation { target: rightButton; property: "opacity"; to: 1 }
300315
src/ShellApplication.cpp+1
@@ -36,6 +36,7 @@ ShellApplication::ShellApplication(int & argc, char ** argv, bool isMirServer)
3636{
3737
3838 setApplicationName(QStringLiteral("unity8"));
39+ setOrganizationName(QStringLiteral("Canonical"));
3940
4041 connect(this, &QGuiApplication::screenAdded, this, &ShellApplication::onScreenAdded);
4142