summaryrefslogtreecommitdiffstats
path: root/app/Main.qml
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2020-04-23 23:52:57 +0300
committerMarius Vlad <marius.vlad@collabora.com>2020-06-24 17:51:41 +0300
commitb872666cdd8c831a0d1de8facb0d816573fadd25 (patch)
tree222ac9cc45eb0e5d5ba270d4da611040ed34ae32 /app/Main.qml
parent0859af125169bf34a5b01f33a7b3831f031bfce2 (diff)
agl-compositor: Adapt alexa-viewer to using the agl-shell-desktop proto
Do not hide the app, for the time being. Bug-AGL: SPEC-3447 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I15e5f40b2d3864dd8e251f75b0a4ba05487c7649
Diffstat (limited to 'app/Main.qml')
-rw-r--r--app/Main.qml11
1 files changed, 7 insertions, 4 deletions
diff --git a/app/Main.qml b/app/Main.qml
index 7060b9b..4011107 100644
--- a/app/Main.qml
+++ b/app/Main.qml
@@ -22,8 +22,8 @@ import QtQuick.Extras 1.4
Window {
id: root
- width: 1080
- height: 1488
+ width: 1000
+ height: 1000
color: '#00000000'
visible: true
@@ -32,7 +32,7 @@ Window {
BodyTemplateDialog {
id: bodyTemplate
anchors.centerIn: parent
- visible: true
+ visible: false
property string title: ""
property string subtitle: ""
@@ -62,6 +62,7 @@ Window {
onRenderTemplate: {
console.log("Received renderTemplate, type = " + GuiMetadata.type)
+
if(GuiMetadata.type == "BodyTemplate1" || GuiMetadata.type == "BodyTemplate2") {
// Normally setting the target to visible would be after changes to the
// content, but I was seeing better behavior during testing by doing it
@@ -80,6 +81,7 @@ Window {
bodyTemplate.imageContentSource = GuiMetadata.bodyImageSmallUrl
}
} else if(GuiMetadata.type == "WeatherTemplate") {
+ console.log("Received weather template")
bodyTemplate.visible = false
weatherTemplate.visible = true
@@ -94,6 +96,7 @@ Window {
weatherTemplate.highTemperatureArrowSource = GuiMetadata.weatherHighTemperatureArrowMediumDarkBgUrl
} else {
// Should not happen, but just in case
+ console.log("Received Unsupported Template?")
bodyTemplate.title = "Unsupported Template"
bodyTemplate.subtitle = ""
bodyTemplate.textContent = "The display template for this response is currently unsupported."
@@ -116,6 +119,6 @@ Window {
function hide() {
console.log("hiding window!")
- homescreen.hideWindow("alexa-viewer")
+ homescreen.deactivate_app("alexa-viewer")
}
}