Skip to content

Commit

Permalink
Merge #4 from OpenVoiceOS/add_mycroft_player_and_position_prop
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl authored Aug 15, 2021
2 parents bf35188 + 493f9d5 commit 42711ea
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 1 deletion.
81 changes: 81 additions & 0 deletions ovos_workshop/res/ui/SeekControl.qml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Item {
property var videoControl
property string title

property var nextAction: "next"
property var previousAction: "previous"

clip: true
implicitWidth: parent.width
implicitHeight: mainLayout.implicitHeight + Kirigami.Units.largeSpacing * 2
Expand Down Expand Up @@ -102,6 +105,84 @@ Item {
}
}

Controls.RoundButton {
id: buttonPrev
Layout.preferredWidth: parent.width > 600 ? Kirigami.Units.iconSizes.large : Kirigami.Units.iconSizes.medium
Layout.preferredHeight: Layout.preferredWidth
highlighted: focus ? 1 : 0
z: 1000

background: Rectangle {
radius: 200
color: "#1a1a1a"
border.width: 1.25
border.color: "white"
}

contentItem: Item {
Image {
width: parent.width - Kirigami.Units.largeSpacing
height: width
anchors.centerIn: parent
source: Qt.resolvedUrl("images/media-previous.svg")
}
}

onClicked: {
triggerGuiEvent(seekControl.previousAction, {})
hideTimer.restart();
}
KeyNavigation.up: video
KeyNavigation.left: backButton
KeyNavigation.right: slider
Keys.onReturnPressed: {
triggerGuiEvent(seekControl.previousAction, {})
hideTimer.restart();
}
onFocusChanged: {
hideTimer.restart();
}
}

Controls.RoundButton {
id: buttonNext
Layout.preferredWidth: parent.width > 600 ? Kirigami.Units.iconSizes.large : Kirigami.Units.iconSizes.medium
Layout.preferredHeight: Layout.preferredWidth
highlighted: focus ? 1 : 0
z: 1000

background: Rectangle {
radius: 200
color: "#1a1a1a"
border.width: 1.25
border.color: "white"
}

contentItem: Item {
Image {
width: parent.width - Kirigami.Units.largeSpacing
height: width
anchors.centerIn: parent
source: Qt.resolvedUrl("images/media-next.svg")
}
}

onClicked: {
triggerGuiEvent(seekControl.nextAction, {})
hideTimer.restart();
}
KeyNavigation.up: video
KeyNavigation.left: backButton
KeyNavigation.right: slider
Keys.onReturnPressed: {
triggerGuiEvent(seekControl.nextAction, {})
hideTimer.restart();
}
onFocusChanged: {
hideTimer.restart();
}
}

Templates.Slider {
id: slider
Layout.fillWidth: true
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='ovos_workshop',
version='0.0.4a5',
version='0.0.4a6',
packages=['ovos_workshop',
'ovos_workshop.skills',
'ovos_workshop.skills.decorators',
Expand Down

0 comments on commit 42711ea

Please sign in to comment.