on xenial help sign in
add splash screen to tablet stuff
89f9de3Michael Zanetti
qml/Shell.qml+1−1
@@ -38,7 +38,7 @@ FocusScope {
38 id: shell
38 id: shell
39
39
40 // this is only here to select the width / height of the window if not running fullscreen
40 // this is only here to select the width / height of the window if not running fullscreen
41− property bool tablet: false
41+ property bool tablet: true
42 width: tablet ? units.gu(160) : applicationArguments.hasGeometry() ? applicationArguments.width() : units.gu(40)
42 width: tablet ? units.gu(160) : applicationArguments.hasGeometry() ? applicationArguments.width() : units.gu(40)
43 height: tablet ? units.gu(100) : applicationArguments.hasGeometry() ? applicationArguments.height() : units.gu(71)
43 height: tablet ? units.gu(100) : applicationArguments.hasGeometry() ? applicationArguments.height() : units.gu(71)
44
44
qml/Stages/StageWithSideStage.qml+37−11
@@ -185,17 +185,20 @@ Item {
185
185
186 onApplicationAdded: {
186 onApplicationAdded: {
187 priv.startingAppId = appId;
187 priv.startingAppId = appId;
188+ splashScreenTimer.start();
188−// var application = ApplicationManager.findApplication(appId)
189+ var application = ApplicationManager.findApplication(appId)
189−// print("Application added:", appId, application.state)
190+ print("Application added:", appId, application.state, application.stage)
190−// if (application.stage == ApplicationInfoInterface.SideStage) {
191+ if (application.stage == ApplicationInfoInterface.SideStage) {
191// priv.sideStageAppId = appId;
192// priv.sideStageAppId = appId;
192−// mainStageImage.switchTo(application)
193−// mainStageImage.visible = true;
194−// } else if (application.stage == ApplicationInfoInterface.MainStage) {
195−// priv.mainStageAppId = appId;
196// sideStageImage.switchTo(application)
193// sideStageImage.switchTo(application)
197// sideStageImage.visible = true;
194// sideStageImage.visible = true;
195+ sideStageSplash.visible = true;
196+ } else if (application.stage == ApplicationInfoInterface.MainStage) {
197+// priv.mainStageAppId = appId;
198+// mainStageImage.switchTo(application)
199+// mainStageImage.visible = true;
200+ mainStageSplash.visible = true;
198−// }
201+ }
199 }
202 }
200
203
201 onFocusRequested: {
204 onFocusRequested: {
@@ -250,6 +253,16 @@ Item {
250
253
251 }
254 }
252
255
256+ Timer {
257+ id: splashScreenTimer
258+ interval: 1500
259+ repeat: false
260+ onTriggered: {
261+ mainStageSplash.visible = false;
262+ sideStageSplash.visible = false;
263+ }
264+ }
265+
253 SwitchingApplicationImage {
266 SwitchingApplicationImage {
254 id: mainStageImage
267 id: mainStageImage
255// height: parent.height
268// height: parent.height
@@ -264,6 +277,13 @@ Item {
264// Rectangle { anchors.fill: parent; color: "red"; opacity: 0.5 }
277// Rectangle { anchors.fill: parent; color: "red"; opacity: 0.5 }
265 }
278 }
266
279
280+ Rectangle {
281+ id: mainStageSplash
282+ anchors.fill: root
283+ anchors.rightMargin: root.width - sideStageImage.x
284+ color: "white"
285+ }
286+
267 SidestageHandle {
287 SidestageHandle {
268 id: sideStageHandle
288 id: sideStageHandle
269 anchors { top: parent.top; right: sideStageImage.left; bottom: parent.bottom }
289 anchors { top: parent.top; right: sideStageImage.left; bottom: parent.bottom }
@@ -321,15 +341,14 @@ Item {
321// Rectangle { anchors.fill: parent; color: "purple"; opacity: .5 }
341// Rectangle { anchors.fill: parent; color: "purple"; opacity: .5 }
322 }
342 }
323
343
324−
325 SwitchingApplicationImage {
344 SwitchingApplicationImage {
326 id: sideStageImage
345 id: sideStageImage
327 width: priv.sideStageWidth
346 width: priv.sideStageWidth
328 height: root.height
347 height: root.height
329− x: root.width - width
348+ x: root.width
330 anchors.bottom: parent.bottom
349 anchors.bottom: parent.bottom
331 visible: true
350 visible: true
332− property bool shown: true
351+ property bool shown: false
333
352
334// Rectangle { anchors.fill: parent; color: "green"; opacity: 0.5 }
353// Rectangle { anchors.fill: parent; color: "green"; opacity: 0.5 }
335
354
@@ -382,4 +401,11 @@ Item {
382 }
401 }
383 }
402 }
384 }
403 }
404+
405+ Rectangle {
406+ id: sideStageSplash
407+ anchors.fill: parent
408+ anchors.leftMargin: sideStageImage.x
409+ color: "white"
410+ }
385}
411}