Remove show preview.
This commit is contained in:
parent
f6d960c257
commit
b0ba856bb5
|
@ -77,20 +77,7 @@ Slider {
|
|||
var a = (progressBar.to / progressBar.availableWidth)
|
||||
* (mouseAreaProgressBar.mapToItem(
|
||||
progressBar, mouseAreaProgressBar.mouseX, 0).x - 2)
|
||||
var shouldSeek = false
|
||||
if (!appearance.updatePreviewWhilstPlaying) {
|
||||
if (!progressBar.playing) {
|
||||
shouldSeek = true
|
||||
}
|
||||
} else {
|
||||
shouldSeek = true
|
||||
}
|
||||
if (shouldSeek) {
|
||||
progressBarTimePreview.playerCommand(
|
||||
Enums.Commands.SeekAbsolute, a)
|
||||
} else {
|
||||
hoverProgressLabel.text = utils.createTimestamp(a)
|
||||
}
|
||||
previewRect.x = mouseAreaProgressBar.mapToItem(
|
||||
controlsOverlay, mouseAreaProgressBar.mouseX,
|
||||
0).x - previewRect.width / 2
|
||||
|
|
|
@ -46,7 +46,6 @@ Window {
|
|||
category: "Logging"
|
||||
property string logFile: "/tmp/KittehPlayer.log"
|
||||
property bool logBackend: true
|
||||
property bool logPreview: false
|
||||
}
|
||||
|
||||
Settings {
|
||||
|
@ -60,7 +59,6 @@ Window {
|
|||
id: appearance
|
||||
category: "Appearance"
|
||||
property bool titleOnlyOnFullscreen: true
|
||||
property bool updatePreviewWhilstPlaying: true
|
||||
property bool clickToPause: true
|
||||
property bool useMpvSubs: false
|
||||
property string themeName: "YouTube"
|
||||
|
@ -205,18 +203,6 @@ Window {
|
|||
z: 1
|
||||
logging: loggingSettings.logBackend
|
||||
|
||||
onPlaylistChanged: function (playlist) {
|
||||
for (var thing in playlist) {
|
||||
var item = playlist[thing]
|
||||
if (playlist[thing]["current"]) {
|
||||
progressBarTimePreview.playerCommand(
|
||||
Enums.Commands.LoadFile,
|
||||
String(playlist[thing]["filename"]))
|
||||
}
|
||||
progressBarTimePreview.playerCommand(Enums.Commands.ForcePause)
|
||||
}
|
||||
}
|
||||
|
||||
Action {
|
||||
onTriggered: {
|
||||
appearance.scaleFactor += 0.1
|
||||
|
@ -470,13 +456,13 @@ Window {
|
|||
id: controlsBar
|
||||
Item {
|
||||
id: previewRect
|
||||
height: 144
|
||||
width: 256
|
||||
z: 80
|
||||
visible: false
|
||||
width: hoverProgressLabel.width
|
||||
|
||||
Rectangle {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
width: hoverProgressLabel.width
|
||||
height: hoverProgressLabel.height
|
||||
|
@ -489,33 +475,10 @@ Window {
|
|||
color: "white"
|
||||
font.family: appearance.fontName
|
||||
font.pixelSize: mainWindow.virtualHeight / 50
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
}
|
||||
|
||||
PlayerBackend {
|
||||
z: 90
|
||||
id: progressBarTimePreview
|
||||
height: parent.height
|
||||
width: parent.width
|
||||
logging: loggingSettings.logPreview
|
||||
|
||||
onDurationStringChanged: function (durationString) {
|
||||
hoverProgressLabel.text = durationString
|
||||
}
|
||||
function startPlayer() {
|
||||
update()
|
||||
progressBarTimePreview.playerCommand(
|
||||
Enums.Commands.SetTrack, ["aid", "no"])
|
||||
progressBarTimePreview.playerCommand(
|
||||
Enums.Commands.SetTrack, ["sid", "no"])
|
||||
progressBarTimePreview.setOption(
|
||||
"ytdl-format",
|
||||
"worstvideo[height<=?" + String(
|
||||
height) + "]/worst")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue