fix it and add another test
commita1e463dfb817c6f7f5ad0e94dcbf073632141897
authorMichael Zanetti <michael.zanetti@canonical.com>
dateTue 17 Nov 2015, 14:36 (11 years ago)
parent03ff1bd
qml/Components/VirtualTouchPad.qml+1−4
@@ -15,13 +15,10 @@
1515 */
1616
1717import QtQuick 2.4
18−import QtQuick.Layouts 1.1
1918import Ubuntu.Components 1.3
2019import UInput 0.1
2120
22−ColumnLayout {
23− spacing: units.gu(2)
24−
21+Item {
2522 property var uinput: UInput {
2623 Component.onCompleted: createMouse();
2724 Component.onDestruction: removeMouse();
qml/DisabledScreenNotice.qml+3−2
@@ -36,11 +36,12 @@ Image {
3636 anchors.fill: parent
3737 }
3838
39−
4039 MouseArea {
40+ objectName: "infoNoticeMouseArea"
4141 anchors.fill: parent
4242 opacity: infoNoteDisplayed ? 1 : 0
43− visible: opactiy > 0
43+ visible: opacity > 0
44+ enabled: visible
4445 Behavior on opacity {
4546 UbuntuNumberAnimation { }
4647 }
tests/qmltests/tst_DisabledScreenNotice.qml+7
@@ -33,5 +33,12 @@ Item {
3333 id: testCase
3434 name: "DisabledScreenNotice"
3535 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+ }
3643 }
3744}