Skip to content

Commit

Permalink
fix:gui search play
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Sep 17, 2024
1 parent 38b7f20 commit f1b9a1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 58 deletions.
56 changes: 0 additions & 56 deletions ovos_plugin_common_play/ocp/res/ui/Home.qml
Original file line number Diff line number Diff line change
Expand Up @@ -27,62 +27,6 @@ Mycroft.Delegate {
parent.parent.parent.currentItem.contentItem.forceActiveFocus()
}

onGuiEvent: {
switch (eventName) {
case "ocp.gui.show.busy.overlay":
busyPageOverlay.open = true
break
case "ocp.gui.hide.busy.overlay":
busyPageOverlay.open = false
break
}
}

Rectangle {
id: busyPageOverlay
visible: busyPageOverlay.open ? 1 : 0
enabled: busyPageOverlay.open ? 1 : 0
z: 2
property bool open: false
anchors.fill: parent
color: Kirigami.Theme.backgroundColor
opacity: busyPageOverlay.open ? 0.95 : 0
radius: 10
property var indicatorText: sessionData.footer_text ? sessionData.footer_text : "Loading"
layer.enabled: true
layer.effect: DropShadow {
horizontalOffset: 0
verticalOffset: 0
radius: 10
samples: 16
color: Kirigami.Theme.backgroundColor
}

Behavior on opacity {
NumberAnimation {
duration: 200
}
}

Controls.BusyIndicator {
id: viewBusyIndicator
visible: busyPageOverlay.visible
anchors.centerIn: parent
running: busyPageOverlay.visible
enabled: busyPageOverlay.visible

Controls.Label {
id: viewBusyIndicatorLabel
visible: busyPageOverlay.visible
enabled: busyPageOverlay.visible
anchors.top: parent.bottom
color: Kirigami.Theme.textColor
anchors.horizontalCenter: parent.horizontalCenter
text: busyPageOverlay.indicatorText
}
}
}

Item {
id: topBarArea
height: Mycroft.Units.gridUnit * 3
Expand Down
4 changes: 2 additions & 2 deletions ovos_plugin_common_play/ocp/res/ui/Search.qml
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,10 @@ Item {
font.bold: true

onAccepted: {
triggerGuiEvent("search", { "utterance": txtFldInternal.text})
triggerGuiEvent("play_search", { "utterance": txtFldInternal.text})
}
Keys.onReturnPressed: {
triggerGuiEvent("search", { "utterance": txtFldInternal.text})
triggerGuiEvent("play_search", { "utterance": txtFldInternal.text})
}
}
}
Expand Down

0 comments on commit f1b9a1d

Please sign in to comment.