Add push to talk support to homescreen
[apps/homescreen.git] / homescreen / qml / MediaAreaBlank.qml
index 51fa657..60d0c92 100644 (file)
@@ -22,9 +22,9 @@ import AGL.Demo.Controls 1.0
 import MasterVolume 1.0
 
 Image {
-    width: 1080
-    height: 215
-    source: './images/Utility_Logo_Background-01.png'
+    width: parent.width
+    height: parent.height
+    source: './images/Utility_Logo_Background-01.svg'
     property bool displayVolume: false;
 
     MouseArea {
@@ -40,14 +40,14 @@ Image {
     }
 
     Image {
-    id: logo_image
+        id: logo_image
         anchors.centerIn: parent
-        source: './images/Utility_Logo_Colour-01.png'
+        source: './images/Utility_Logo_Grey-01.svg'
     }
 
     Timer {
         id: volume_timer
-        interval: 5000; running: false; repeat: false
+        interval: 3000; running: false; repeat: false
         onTriggered: displayVolume = false
     }
 
@@ -56,11 +56,13 @@ Image {
     PropertyChanges { target: master_volume; opacity: 1.0 }
     PropertyChanges { target: slider; enabled: true }
     PropertyChanges { target: logo_image; opacity: 0.0 }
+    PropertyChanges { target: speech_chrome; visible: false }
     },
     State { when: !displayVolume;
     PropertyChanges { target: master_volume; opacity: 0.0 }
     PropertyChanges { target: slider; enabled: false }
     PropertyChanges { target: logo_image; opacity: 1.0 }
+    PropertyChanges { target: speech_chrome; visible: speech_chrome.agentPresent }
     }
     ]
 
@@ -72,6 +74,9 @@ Image {
         id: mv
         objectName: "mv"
         onVolumeChanged: slider.value = volume
+        Component.onCompleted: {
+            mv.open(bindingAddress);
+        }
     }
 
     Item {
@@ -84,7 +89,7 @@ Image {
             font.pixelSize: 36
             anchors.horizontalCenter: parent.horizontalCenter
             color: "white"
-            text: "Master Volume"
+            text: qsTr("Master Volume")
         }
 
         RowLayout {
@@ -101,8 +106,8 @@ Image {
                 id: slider
                 Layout.fillWidth: true
                 from: 0
-                to: 65536
-                stepSize: 256
+                to: 100
+                stepSize: 1
                 snapMode: Slider.SnapOnRelease
                 onValueChanged: mv.volume = value
                 Component.onCompleted: value = mv.volume
@@ -110,20 +115,6 @@ Image {
                     if (pressed) {volume_timer.stop()}
                     else {volume_timer.restart()}
                 }
-                background: Rectangle {
-                    id: slider_bg
-                    height: 16
-                    color: "#59FF7F"
-                }
-                handle: Rectangle {
-                    anchors.verticalCenter: slider_bg.verticalCenter
-                    width: 48
-                    height: 48
-                    radius: 24
-                    x: slider.leftPadding + slider.visualPosition * (slider.availableWidth - width)
-                    y: slider.topPadding + slider.availableHeight / 2 - height / 2
-                    color: "white"
-                }
             }
             Label {
                 font.pixelSize: 36
@@ -132,4 +123,12 @@ Image {
             }
         }
     }
+
+    SpeechChrome {
+        id: speech_chrome
+        anchors.left: parent.left
+        anchors.right: parent.right
+        anchors.bottom: parent.bottom
+        height: parent.height
+    }
 }