on xenial help sign in
If edge is 'none', allow a skip-click anywhere on the overlay
99a0740Michael Terry
Components/DemoOverlay.qml+9−4
@@ -60,12 +60,20 @@ Item {
60
60
61 signal skip()
61 signal skip()
62
62
63+ onSkip: overlay.enabled = false
64+
63 Rectangle {
65 Rectangle {
64 id: backgroundShade
66 id: backgroundShade
65 anchors.fill: parent
67 anchors.fill: parent
66 color: "black"
68 color: "black"
67 opacity: 0.8
69 opacity: 0.8
68 visible: overlay.active
70 visible: overlay.active
71+
72+ MouseArea {
73+ anchors.fill: parent
74+ enabled: overlay.edge == "none" && backgroundShade.opacity == 0.8
75+ onClicked: skip()
76+ }
69 }
77 }
70
78
71 Item {
79 Item {
@@ -113,10 +121,7 @@ Item {
113
121
114 MouseArea {
122 MouseArea {
115 anchors.fill: parent
123 anchors.fill: parent
116− onClicked: {
124+ onClicked: skip()
117− overlay.enabled = false;
118− skip();
119− }
120 }
125 }
121 }
126 }
122 }
127 }