on xenial help sign in
fix it and add another test
a1e463dMichael Zanetti
qml/Components/VirtualTouchPad.qml+1−4
@@ -15,13 +15,10 @@
15 */
15 */
16
16
17import QtQuick 2.4
17import QtQuick 2.4
18−import QtQuick.Layouts 1.1
19import Ubuntu.Components 1.3
18import Ubuntu.Components 1.3
20import UInput 0.1
19import UInput 0.1
21
20
22−ColumnLayout {
21+Item {
23− spacing: units.gu(2)
24−
25 property var uinput: UInput {
22 property var uinput: UInput {
26 Component.onCompleted: createMouse();
23 Component.onCompleted: createMouse();
27 Component.onDestruction: removeMouse();
24 Component.onDestruction: removeMouse();
qml/DisabledScreenNotice.qml+3−2
@@ -36,11 +36,12 @@ Image {
36 anchors.fill: parent
36 anchors.fill: parent
37 }
37 }
38
38
39−
40 MouseArea {
39 MouseArea {
40+ objectName: "infoNoticeMouseArea"
41 anchors.fill: parent
41 anchors.fill: parent
42 opacity: infoNoteDisplayed ? 1 : 0
42 opacity: infoNoteDisplayed ? 1 : 0
43− visible: opactiy > 0
43+ visible: opacity > 0
44+ enabled: visible
44 Behavior on opacity {
45 Behavior on opacity {
45 UbuntuNumberAnimation { }
46 UbuntuNumberAnimation { }
46 }
47 }
tests/qmltests/tst_DisabledScreenNotice.qml+7
@@ -33,5 +33,12 @@ Item {
33 id: testCase
33 id: testCase
34 name: "DisabledScreenNotice"
34 name: "DisabledScreenNotice"
35 when: windowShown
35 when: windowShown
36+
37+ function test_mouseAreaHidesOnFirstTap() {
38+ var mouseArea = findChild(touchScreenPad, "infoNoticeMouseArea")
39+ compare(mouseArea.enabled, true)
40+ tap(root)
41+ tryCompare(mouseArea, "enabled", false)
42+ }
36 }
43 }
37}
44}