[UI] Made backwards compatable with older QtQuick versions.
This commit is contained in:
parent
1c3046d5e1
commit
2256244b94
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.11
|
||||
|
@ -96,7 +96,6 @@ Item {
|
|||
}
|
||||
Connections {
|
||||
target: player
|
||||
enabled: true
|
||||
onSubtitlesChanged: function (subtitles) {
|
||||
nativeSubs.text = subtitles
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
|
||||
Menu {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Window 2.11
|
||||
|
@ -98,7 +98,6 @@ Dialog {
|
|||
|
||||
Connections {
|
||||
target: player
|
||||
enabled: true
|
||||
onPlaylistChanged: function (playlist) {
|
||||
playlistModel.clear()
|
||||
thumbnailJobs = []
|
||||
|
@ -171,7 +170,6 @@ Dialog {
|
|||
contentItem: Text {
|
||||
id: playlistItemText
|
||||
font: parent.font
|
||||
bottomPadding: 0
|
||||
color: "white"
|
||||
text: playlistItem.getText(itemTitle, itemURL)
|
||||
height: parent.height
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import Qt.labs.settings 1.0
|
||||
import player 1.0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import Qt.labs.settings 1.0
|
||||
import player 1.0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import Qt.labs.settings 1.0
|
||||
|
||||
|
@ -7,7 +7,6 @@ MenuItem {
|
|||
implicitHeight: 20
|
||||
|
||||
contentItem: Text {
|
||||
leftPadding: menuItem.indicator.width
|
||||
text: menuItem.text
|
||||
|
||||
font.family: appearance.fontName
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Window 2.11
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Window 2.11
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import Qt.labs.settings 1.0
|
||||
import player 1.0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Window 2.11
|
||||
|
@ -22,7 +22,6 @@ MenuBar {
|
|||
|
||||
Connections {
|
||||
target: player
|
||||
enabled: true
|
||||
onTracksChanged: function (tracks) {
|
||||
menuBar.updateTracks(tracks)
|
||||
}
|
||||
|
@ -348,7 +347,6 @@ MenuBar {
|
|||
|
||||
Connections {
|
||||
target: player
|
||||
enabled: true
|
||||
onAudioDevicesChanged: function (ad) {
|
||||
audioDeviceMenu.updateAudioDevices(ad)
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.11
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.11
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.11
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.11
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.11
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.11
|
||||
|
@ -23,7 +23,6 @@ Button {
|
|||
}
|
||||
Connections {
|
||||
target: player
|
||||
enabled: true
|
||||
onPlayStatusChanged: function (status) {
|
||||
if (status == Enums.PlayStatus.Playing) {
|
||||
icon.source = "qrc:/icons/" + appearance.themeName + "/pause.svg"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.11
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.11
|
||||
|
@ -25,7 +25,6 @@ Button {
|
|||
}
|
||||
Connections {
|
||||
target: player
|
||||
enabled: true
|
||||
onPlaylistPositionChanged: function (position) {
|
||||
if (appearance.themeName == "YouTube") {
|
||||
if (position != 0) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.11
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.11
|
||||
|
@ -9,8 +9,6 @@ import player 1.0
|
|||
|
||||
Text {
|
||||
id: speedText
|
||||
leftPadding: 0
|
||||
rightPadding: 0
|
||||
text: "1x"
|
||||
font.family: appearance.fontName
|
||||
font.pixelSize: layout.height / 2.5
|
||||
|
@ -22,7 +20,6 @@ Text {
|
|||
verticalAlignment: Text.AlignVCenter
|
||||
Connections {
|
||||
target: player
|
||||
enabled: true
|
||||
onSpeedChanged: function (speed) {
|
||||
speedText.text = String(speed) + "x"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.11
|
||||
|
@ -12,14 +12,12 @@ Text {
|
|||
objectName: "timeLabel"
|
||||
text: "0:00 / 0:00"
|
||||
color: "white"
|
||||
padding: 2
|
||||
font.family: appearance.fontName
|
||||
font.pixelSize: layout.height / 2.5
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
renderType: Text.NativeRendering
|
||||
Connections {
|
||||
target: player
|
||||
enabled: true
|
||||
onDurationStringChanged: function (durationString) {
|
||||
timeLabel.text = durationString
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.11
|
||||
|
@ -31,7 +31,6 @@ Rectangle {
|
|||
|
||||
Connections {
|
||||
target: player
|
||||
enabled: true
|
||||
onVolumeChanged: function (volume) {
|
||||
volumeSlider.value = volume
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.11
|
||||
|
@ -15,7 +15,6 @@ Slider {
|
|||
value: 0.0
|
||||
Connections {
|
||||
target: player
|
||||
enabled: true
|
||||
onPositionChanged: function (position) {
|
||||
if (!pressed) {
|
||||
progressBar.value = position
|
||||
|
@ -107,7 +106,6 @@ Slider {
|
|||
id: chapterMarkers
|
||||
Connections {
|
||||
target: player
|
||||
enabled: true
|
||||
onChaptersChanged: function (chapters) {
|
||||
for (var i = 0, len = chapters.length; i < len; i++) {
|
||||
var component = Qt.createComponent("ChapterMarker.qml")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.11
|
||||
|
@ -35,7 +35,6 @@ Button {
|
|||
|
||||
Connections {
|
||||
target: player
|
||||
enabled: true
|
||||
onVolumeStatusChanged: updateStatus
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.11
|
||||
|
@ -25,7 +25,6 @@ Slider {
|
|||
}
|
||||
Connections {
|
||||
target: player
|
||||
enabled: true
|
||||
onVolumeChanged: function (volume) {
|
||||
volumeBar.value = volume
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import Qt.labs.settings 1.0
|
||||
|
||||
import "translations.js" as Translations
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.11
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.11
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.11
|
||||
|
@ -415,7 +415,6 @@ Window {
|
|||
|| (mainWindow.visibility == Window.FullScreen))
|
||||
Connections {
|
||||
target: player
|
||||
enabled: true
|
||||
onTitleChanged: function (title) {
|
||||
titleLabel.text = title
|
||||
}
|
||||
|
@ -453,7 +452,6 @@ Window {
|
|||
id: hoverProgressLabel
|
||||
text: "0:00"
|
||||
color: "white"
|
||||
padding: 2
|
||||
z: 90
|
||||
font.family: appearance.fontName
|
||||
font.pixelSize: mainWindow.virtualHeight / 50
|
||||
|
|
Loading…
Reference in a new issue