on xenial help sign in
Bring the dash background from the shell to the dash
11e593cAlbert Astals
qml/Components/EdgeDemo.qml+10−10
@@ -24,7 +24,7 @@ Item {
24 property Item greeter
24 property Item greeter
25 property Item launcher
25 property Item launcher
26 property Item indicators
26 property Item indicators
27− property Item underlay
27+ property Item stages
28
28
29 property bool launcherEnabled: true
29 property bool launcherEnabled: true
30 property bool dashEnabled: true
30 property bool dashEnabled: true
@@ -138,12 +138,12 @@ Item {
138
138
139 function startTopEdgeDemo() {
139 function startTopEdgeDemo() {
140 demo.panelEnabled = true;
140 demo.panelEnabled = true;
141− if (demo.dash && demo.underlay) {
141+ if (demo.dash && demo.stages) {
142− d.topEdgeDemo = d.overlay.createObject(demo.underlay, {
142+ d.topEdgeDemo = d.overlay.createObject(demo.stages, {
143 "edge": "top",
143 "edge": "top",
144 "title": i18n.tr("Top edge"),
144 "title": i18n.tr("Top edge"),
145 "text": i18n.tr("Try swiping from the top edge to access the indicators"),
145 "text": i18n.tr("Try swiping from the top edge to access the indicators"),
146− "anchors.fill": demo.underlay,
146+ "anchors.fill": demo.stages,
147 });
147 });
148 }
148 }
149 if (d.topEdgeDemo) {
149 if (d.topEdgeDemo) {
@@ -192,12 +192,12 @@ Item {
192 function startLeftEdgeDemo() {
192 function startLeftEdgeDemo() {
193 demo.panelEnabled = false;
193 demo.panelEnabled = false;
194 demo.launcherEnabled = true;
194 demo.launcherEnabled = true;
195− if (demo.underlay) {
195+ if (demo.stages) {
196− d.leftEdgeDemo = d.overlay.createObject(demo.underlay, {
196+ d.leftEdgeDemo = d.overlay.createObject(demo.stages, {
197 "edge": "left",
197 "edge": "left",
198 "title": i18n.tr("Left edge"),
198 "title": i18n.tr("Left edge"),
199 "text": i18n.tr("Swipe from the left to reveal the launcher for quick access to apps"),
199 "text": i18n.tr("Swipe from the left to reveal the launcher for quick access to apps"),
200− "anchors.fill": demo.underlay,
200+ "anchors.fill": demo.stages,
201 });
201 });
202 }
202 }
203 if (d.leftEdgeDemo) {
203 if (d.leftEdgeDemo) {
@@ -220,12 +220,12 @@ Item {
220
220
221 function startFinalEdgeDemo() {
221 function startFinalEdgeDemo() {
222 demo.launcherEnabled = false;
222 demo.launcherEnabled = false;
223− if (demo.underlay) {
223+ if (demo.stages) {
224− d.finalEdgeDemo = d.overlay.createObject(demo.underlay, {
224+ d.finalEdgeDemo = d.overlay.createObject(demo.stages, {
225 "edge": "none",
225 "edge": "none",
226 "title": i18n.tr("Well done"),
226 "title": i18n.tr("Well done"),
227 "text": i18n.tr("You have now mastered the edge gestures and can start using the phone<br><br>Tap on the screen to start"),
227 "text": i18n.tr("You have now mastered the edge gestures and can start using the phone<br><br>Tap on the screen to start"),
228− "anchors.fill": demo.underlay,
228+ "anchors.fill": demo.stages,
229 "showSkip": false,
229 "showSkip": false,
230 });
230 });
231 }
231 }
qml/Dash/Dash.qml+8
@@ -74,6 +74,14 @@ Showable {
74 filterRegExp: RegExp("^true$")
74 filterRegExp: RegExp("^true$")
75 }
75 }
76
76
77+ Image {
78+ anchors.fill: parent
79+ source: parent.width > parent.height ? "graphics/paper_landscape.png" : "graphics/paper_portrait.png"
80+ fillMode: Image.PreserveAspectCrop
81+ horizontalAlignment: Image.AlignRight
82+ verticalAlignment: Image.AlignTop
83+ }
84+
77 DashContent {
85 DashContent {
78 id: dashContent
86 id: dashContent
79 objectName: "dashContent"
87 objectName: "dashContent"
qml/Shell.qml+1−20
@@ -112,25 +112,6 @@ Item {
112 }
112 }
113 }
113 }
114
114
115− Item {
116− id: underlay
117− objectName: "underlay"
118− anchors.fill: parent
119−
120− // Whether the underlay is fully covered by opaque UI elements.
121− property bool fullyCovered: (panel.indicators.fullyOpened && shell.width <= panel.indicatorsMenuWidth)
122− || stages.fullyShown || greeterWrapper.fullyShown
123− visible: !fullyCovered
124−
125− Image {
126− anchors.fill: underlay
127− source: shell.width > shell.height ? "Dash/graphics/paper_landscape.png" : "Dash/graphics/paper_portrait.png"
128− fillMode: Image.PreserveAspectCrop
129− horizontalAlignment: Image.AlignRight
130− verticalAlignment: Image.AlignTop
131− }
132− }
133−
134 Item {
115 Item {
135 id: stages
116 id: stages
136 objectName: "stages"
117 objectName: "stages"
@@ -580,7 +561,7 @@ Item {
580 greeter: greeter
561 greeter: greeter
581 launcher: launcher
562 launcher: launcher
582 indicators: panel.indicators
563 indicators: panel.indicators
583− underlay: underlay
564+ stages: stages
584 }
565 }
585
566
586 Connections {
567 Connections {