1
0
Fork 0
VideoPlayer/src/qml/YouTubeButtonLayout.qml

93 lines
2.1 KiB
QML
Raw Normal View History

import QtQuick 2.0
import player 1.0
Item {
objectName: "buttonLayout"
id: layout
anchors.fill: controlsBar
2018-11-30 16:42:19 +00:00
height: parent.height
PlaylistPrevButton {
id: playlistPrevButton
2020-04-24 17:06:14 +01:00
anchors {
left: parent.left
top: parent.top
bottom: parent.bottom
}
width: visible ? playlistNextButton.width : 0
}
PlayPauseButton {
id: playPauseButton
2020-04-24 17:06:14 +01:00
anchors {
left: playlistPrevButton.right
top: parent.top
bottom: parent.bottom
}
leftPadding: 14
}
PlaylistNextButton {
id: playlistNextButton
2020-04-24 17:06:14 +01:00
anchors {
left: playPauseButton.right
top: parent.top
bottom: parent.bottom
}
}
MouseArea {
id: mouseAreaVolumeArea
2020-04-24 17:06:14 +01:00
anchors.fill: volumeSlider
2020-04-24 11:15:49 +01:00
width: volumeSlider.width
hoverEnabled: true
propagateComposedEvents: true
acceptedButtons: Qt.NoButton
2020-04-24 11:15:49 +01:00
z: 100
}
VolumeButton {
id: volumeButton
2020-04-24 17:06:14 +01:00
anchors {
left: playlistNextButton.right
top: parent.top
bottom: parent.bottom
}
2020-04-24 11:15:49 +01:00
z: 50
}
VolumeSlider {
id: volumeSlider
2020-04-24 17:06:14 +01:00
anchors {
left: volumeButton.right
top: parent.top
bottom: parent.bottom
}
2018-11-30 16:42:19 +00:00
height: parent.height
visible: mouseAreaVolumeArea.containsMouse || volumeButton.hovered
width: visible ? implicitWidth : 0
}
TimeLabel {
2020-04-24 17:06:14 +01:00
anchors {
left: volumeSlider.right
top: parent.top
bottom: parent.bottom
leftMargin: parent.width / 128
}
}
SettingsButton {
id: settingsButton
2020-04-24 17:06:14 +01:00
anchors {
right: fullscreenButton.left
top: parent.top
bottom: parent.bottom
}
}
FullscreenButton {
id: fullscreenButton
2020-04-24 17:06:14 +01:00
anchors {
right: parent.right
top: parent.top
bottom: parent.bottom
}
}
}