@@ -21,61 +21,74 @@ import "../../../Components"
24− width: 700
24+ width: boxWidth * 3
25− height: 500
25+ height: boxHeight * 2
27− DemoOverlay {
27+ property int boxWidth: 250
28+ property int boxHeight: 250
29 edge: "top"
32 edge: "top"
30 title: "Top"
33 title: "Top"
31 text: "Displayed on top left"
34 text: "Displayed on top left"
32− x: 0
35+ anchors.left: parent.left
33− y: 0
36+ anchors.top: parent.top
34− width: parent.width/2
37+ width: boxWidth
35− height: parent.height/2
38+ height: boxHeight
38− DemoOverlay {
41+ EdgeDemoOverlay {
40 edge: "right"
43 edge: "right"
41 title: "Right"
44 title: "Right"
42 text: "Displayed on top right"
45 text: "Displayed on top right"
43− x: parent.width/2
46+ anchors.right: parent.right
44− y: 0
47+ anchors.top: parent.top
45− width: parent.width/2
48+ width: boxWidth
46− height: parent.height/2
49+ height: boxHeight
49− DemoOverlay {
52+ EdgeDemoOverlay {
51 edge: "left"
54 edge: "left"
52 title: "Left"
55 title: "Left"
53 text: "Displayed on bottom right"
56 text: "Displayed on bottom right"
54− x: parent.width/2
57+ anchors.right: parent.right
55− y: parent.height/2
58+ anchors.bottom: parent.bottom
56− width: parent.width/2
59+ width: boxWidth
57− height: parent.height/2
60+ height: boxHeight
58 available: false
61 available: false
61− DemoOverlay {
64+ EdgeDemoOverlay {
62 id: bottom
65 id: bottom
63 edge: "bottom"
66 edge: "bottom"
64 title: "Bottom"
67 title: "Bottom"
65 text: "Displayed on bottom left"
68 text: "Displayed on bottom left"
66− x: 0
69+ anchors.left: parent.left
67− y: parent.height/2
70+ anchors.bottom: parent.bottom
68− width: parent.width/2
71+ width: boxWidth
69− height: parent.height/2
72+ height: boxHeight
79+ text: "Displayed on top middle"
80+ anchors.horizontalCenter: parent.horizontalCenter
81+ anchors.top: parent.top
72 SignalSpy {
86 SignalSpy {
73 id: signalSpy
87 id: signalSpy
77 UT.UnityTestCase {
90 UT.UnityTestCase {
78− name: "DemoOverlay"
91+ name: "EdgeDemoOverlay"
79 when: windowShown
92 when: windowShown
81 function test_animations() {
94 function test_animations() {
@@ -89,6 +102,7 @@ Item {
91 function test_skip() {
104 function test_skip() {
105+ signalSpy.target = bottom
92 signalSpy.signalName = "skip"
106 signalSpy.signalName = "skip"
93 signalSpy.clear()
107 signalSpy.clear()
94 var bottomSkip = findChild(bottom, "skipLabel")
108 var bottomSkip = findChild(bottom, "skipLabel")
@@ -96,6 +110,16 @@ Item {
96 mouseRelease(bottomSkip, 1, 1)
110 mouseRelease(bottomSkip, 1, 1)
97 signalSpy.wait()
111 signalSpy.wait()
98 compare(bottom.available, false)
112 compare(bottom.available, false)
114+ // Test that the 'none' edge skips anywhere
115+ signalSpy.target = none
117+ var backgroundShade = findChild(none, "backgroundShade")
118+ tryCompare(none, "opacity", 1)
119+ mousePress(backgroundShade, 1, 1)
120+ mouseRelease(backgroundShade, 1, 1)
122+ compare(none.available, false)