X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=homescreen%2Fqml%2Fmain.qml;fp=homescreen%2Fqml%2Fmain.qml;h=de833a9463187934a64cda3dea19e140a5297c72;hb=e3767af1a9d44abe2ea88ba85ff004cbdaefc21c;hp=a8d095b91c46b9cec69092781ba963dee44d71d0;hpb=f266dcd35564ea649ed1435a3ab7a3abbef900d9;p=apps%2Fhomescreen.git diff --git a/homescreen/qml/main.qml b/homescreen/qml/main.qml index a8d095b..de833a9 100644 --- a/homescreen/qml/main.qml +++ b/homescreen/qml/main.qml @@ -142,13 +142,15 @@ Window { container.state = 'fullscreen' touchArea.switchArea(1) homescreenHandler.tapShortcut(appName, true) - container.opacity = 0.0 + container.visible = false + voiceBtn.visible = false } else { image.source = './images/normal.png' container.state = 'normal' touchArea.switchArea(0) homescreenHandler.tapShortcut(appName, false) - container.opacity = 1.0 + container.visible = true + voiceBtn.visible = true } } } @@ -189,6 +191,7 @@ Window { image.visible = true touchArea.switchArea(0) container.opacity = 1.0 + voiceBtn.visible = true } } @@ -199,6 +202,7 @@ Window { image.visible = false touchArea.switchArea(1) container.opacity = 0.0 + voiceBtn.visible = false } } @@ -293,4 +297,36 @@ Window { notificationTimer.restart() } } + + Connections { + target: homescreenVoice + onStatusChanged: { + voiceBtn.visible = status + } + } + + Item { + id: voiceBtn + width: 110 + height: 110 + anchors.bottom: parent.bottom + anchors.right: parent.right + anchors.bottomMargin: 50 + anchors.rightMargin: 0 + visible: true + Image { + id: voiceimage + anchors.left: parent.left + anchors.top: parent.top + width: 110 + height: 110 + source: './images/voice.png' + } + MouseArea { + anchors.fill: parent + onClicked: { + homescreenVoice.startListening(); + } + } + } }