Files
OpenVR-AdvancedSettings-frame/src/res/qml/media_keys/MediaControllerKeys.qml
T
Vasily 9aaaf20577 Replace pause and play buttons with combined pause/play
The separate pause and play buttons necessitated changing between them
to signal that state had changed. Replacing it with a combined
pause/play button sidesteps all the issues in syncing up when which icon
should be shown.
2019-01-13 17:57:15 +01:00

68 lines
1.8 KiB
QML

import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import matzman666.advsettings 1.0
// Necessary for the project specific Components.
import ".."
GroupBox {
id: mediaKeysGroupBox
Layout.fillWidth: true
label: MyText {
leftPadding: 10
text: "Media Control Keys"
bottomPadding: -10
}
background: Rectangle {
color: "transparent"
border.color: "#ffffff"
radius: 8
}
ColumnLayout {
anchors.fill: parent
LineSeparator {
}
RowLayout {
property string playPauseButtonPath: "outline_play_pause_white_24dp.svg"
property string stopButtonPath: "outline_stop_white_24dp.svg"
property string previousButtonPath: "outline_skip_previous_white_24dp.svg"
property string nextButtonPath: "outline_skip_next_white_24dp.svg"
MediaButton {
id: previousSongButton
imagePath: parent.previousButtonPath
onClicked: {
UtilitiesTabController.sendMediaPreviousSong()
}
}
MediaButton {
id: stopSongButton
imagePath: parent.stopButtonPath
onClicked: {
UtilitiesTabController.sendMediaStopSong()
}
}
MediaButton {
id: playPauseSongButton
imagePath: parent.playPauseButtonPath
onClicked: {
UtilitiesTabController.sendMediaPausePlay()
}
}
MediaButton {
id: nextSongButton
imagePath: parent.nextButtonPath
onClicked: {
UtilitiesTabController.sendMediaNextSong()
}
}
}
}
}