clip: true
property bool agentPresent: speechChromeController.agentPresent
+ property string agentName: speechChromeController.agentName
visible: agentPresent
}
Image {
- id: pushToTalk
+ id: pushToTalkLeft
height: parent.height * 0.80
width: height
anchors.left: parent.left
anchors.leftMargin: parent.width / 128
anchors.verticalCenter: parent.verticalCenter
- source: "./images/SpeechChrome/push_to_talk.svg"
+ source: agentName === "Alexa" ? "./images/SpeechChrome/push_to_talk_alexa.png" : "./images/SpeechChrome/push_to_talk.svg"
+
+ MouseArea {
+ anchors.fill: parent
+ onPressed: speechChromeController.pushToTalk()
+ }
+
+ Behavior on opacity {
+ NumberAnimation { duration: 250 }
+ }
+ }
+
+ Image {
+ id: pushToTalkRight
+
+ height: parent.height * 0.80
+ width: height
+
+ anchors.right: parent.right
+ anchors.rightMargin: parent.width / 128
+ anchors.verticalCenter: parent.verticalCenter
+ source: agentName === "Alexa" ? "./images/SpeechChrome/push_to_talk_alexa.png" : "./images/SpeechChrome/push_to_talk.svg"
MouseArea {
anchors.fill: parent
x: 0
}
PropertyChanges {
- target: pushToTalk
+ target: pushToTalkLeft
+ opacity: 1.0
+ enabled: true
+ }
+ PropertyChanges {
+ target: pushToTalkRight
opacity: 1.0
enabled: true
}
x: 0
}
PropertyChanges {
- target: pushToTalk
+ target: pushToTalkLeft
+ opacity: 0.0
+ enabled: false
+ }
+ PropertyChanges {
+ target: pushToTalkRight
opacity: 0.0
enabled: false
}
x: root.width - chromeBarImage.width
}
PropertyChanges {
- target: pushToTalk
+ target: pushToTalkLeft
+ opacity: 0.0
+ enabled: false
+ }
+ PropertyChanges {
+ target: pushToTalkRight
opacity: 0.0
enabled: false
}
x: (root.width - chromeBarImage.width) * 0.5
}
PropertyChanges {
- target: pushToTalk
+ target: pushToTalkLeft
+ opacity: 0.0
+ enabled: false
+ }
+ PropertyChanges {
+ target: pushToTalkRight
opacity: 0.0
enabled: false
}
x: 0
}
PropertyChanges {
- target: pushToTalk
+ target: pushToTalkLeft
+ opacity: 1.0
+ enabled: true
+ }
+ PropertyChanges {
+ target: pushToTalkRight
opacity: 1.0
enabled: true
}