@@ -48,23 +48,17 @@ Showable {
49 readonly property bool active: available && visible
49 readonly property bool active: available && visible
51− property color __orange_transparent: Qt.hsla(16.0/360.0, 0.83, 0.47, 0.4)
52− property int __edge_margin: units.gu(4)
53− property int __text_margin: units.gu(3)
54− property bool __skip_on_hide: false
55− property int __anim_running: wholeAnimation.running // for testing
57 signal skip()
51 signal skip()
59 function doSkip() {
53 function doSkip() {
60− __skip_on_hide = true;
54+ d.skipOnHide = true;
64 function hideNow() {
58 function hideNow() {
65 overlay.visible = false;
59 overlay.visible = false;
66 overlay.available = false;
60 overlay.available = false;
67− if (overlay.__skip_on_hide) {
61+ if (d.skipOnHide) {
68 overlay.skip();
62 overlay.skip();
@@ -81,6 +75,12 @@ Showable {
81 onRunningChanged: if (!running) overlay.hideNow()
75 onRunningChanged: if (!running) overlay.hideNow()
80+ property bool skipOnHide: false
81+ property int edgeMargin: units.gu(4)
84 Rectangle {
84 Rectangle {
85 anchors.fill: parent
85 anchors.fill: parent
86 color: "black"
86 color: "black"
@@ -105,10 +105,10 @@ Showable {
106 id: labelGroup
106 id: labelGroup
107 layer.enabled: true // otherwise the underlining on "Skip intro" jumps
107 layer.enabled: true // otherwise the underlining on "Skip intro" jumps
108− spacing: overlay.__text_margin
108+ spacing: units.gu(3)
110 anchors {
110 anchors {
111− margins: overlay.__edge_margin
111+ margins: d.edgeMargin
112 left: parent.left
112 left: parent.left
113 top: overlay.edge == "bottom" ? undefined : parent.top
113 top: overlay.edge == "bottom" ? undefined : parent.top
114 bottom: overlay.edge == "bottom" ? parent.bottom : undefined
114 bottom: overlay.edge == "bottom" ? parent.bottom : undefined
@@ -150,7 +150,7 @@ Showable {
150 gradient: Gradient {
150 gradient: Gradient {
151 GradientStop {
151 GradientStop {
152 position: 0.0
152 position: 0.0
153− color: overlay.__orange_transparent
153+ color: Qt.hsla(16.0/360.0, 0.83, 0.47, 0.4) // UbuntuColors.orange, but transparent
155 GradientStop {
155 GradientStop {
156 position: 1.0
156 position: 1.0
@@ -185,6 +185,7 @@ Showable {
186 SequentialAnimation {
186 SequentialAnimation {
187 id: wholeAnimation
187 id: wholeAnimation
188+ objectName: "wholeAnimation"
188 running: overlay.active
189 running: overlay.active
190 ParallelAnimation {
191 ParallelAnimation {
@@ -203,12 +204,12 @@ Showable {
205 if (overlay.edge == "right") {
206 if (overlay.edge == "right") {
206− return overlay.__edge_margin + units.gu(3)
207+ return d.edgeMargin + units.gu(3)
208− return overlay.__edge_margin - units.gu(3)
209+ return d.edgeMargin - units.gu(3)
211− to: overlay.__edge_margin
212+ to: d.edgeMargin
212 duration: overlay.edge == "none" ? 0 : UbuntuAnimation.SleepyDuration
213 duration: overlay.edge == "none" ? 0 : UbuntuAnimation.SleepyDuration
214 StandardAnimation {
215 StandardAnimation {
@@ -251,7 +252,7 @@ Showable {
251 if (status == Powerd.Off && wholeAnimation.running) {
252 if (status == Powerd.Off && wholeAnimation.running) {
252 wholeAnimation.pause();
253 wholeAnimation.pause();
253 } else if (status == Powerd.On) {
254 } else if (status == Powerd.On) {
254− wholeAnimation.pause();
255+ wholeAnimation.resume();