290
/* Progress bar component */
292
id: musicToolbarFullProgressContainer
293
anchors.left: parent.left
294
anchors.leftMargin: units.gu(3)
295
anchors.right: parent.right
296
anchors.rightMargin: units.gu(3)
297
anchors.top: blurredBackground.bottom
298
anchors.topMargin: units.gu(1)
304
id: musicToolbarFullPositionLabel
305
anchors.top: progressSliderMusic.bottom
306
anchors.topMargin: units.gu(-2)
307
anchors.left: parent.left
308
color: styleMusic.nowPlaying.labelSecondaryColor
310
height: parent.height
311
horizontalAlignment: Text.AlignHCenter
312
text: durationToString(player.position)
313
verticalAlignment: Text.AlignVCenter
318
id: progressSliderMusic
319
anchors.left: parent.left
320
anchors.right: parent.right
321
maximumValue: player.duration // load value at startup
322
objectName: "progressSliderShape"
323
style: UbuntuBlueSliderStyle {}
324
value: player.position // load value at startup
326
function formatValue(v) {
327
if (seeking) { // update position label while dragging
328
musicToolbarFullPositionLabel.text = durationToString(v)
331
return durationToString(v)
334
property bool seeking: false
335
property bool seeked: false
338
if (seeking === false) {
339
musicToolbarFullPositionLabel.text = durationToString(player.position)
350
musicToolbarFullPositionLabel.text = durationToString(value)
357
// seeked is a workaround for bug 1310706 as the first position after a seek is sometimes invalid (0)
358
if (progressSliderMusic.seeking === false && !progressSliderMusic.seeked) {
359
musicToolbarFullPositionLabel.text = durationToString(player.position)
360
musicToolbarFullDurationLabel.text = durationToString(player.duration)
362
progressSliderMusic.value = player.position
363
progressSliderMusic.maximumValue = player.duration
366
progressSliderMusic.seeked = false;
369
musicToolbarFullPositionLabel.text = durationToString(0);
370
musicToolbarFullDurationLabel.text = durationToString(0);
377
id: musicToolbarFullDurationLabel
378
anchors.top: progressSliderMusic.bottom
379
anchors.topMargin: units.gu(-2)
380
anchors.right: parent.right
381
color: styleMusic.nowPlaying.labelSecondaryColor
383
height: parent.height
384
horizontalAlignment: Text.AlignHCenter
385
text: durationToString(player.duration)
386
verticalAlignment: Text.AlignVCenter
286
392
function removeQueue(index)
475
581
id: musicToolbarFullContainer
476
582
anchors.bottom: parent.bottom
477
583
color: styleMusic.common.black
479
585
width: parent.width
481
/* Progress bar component */
483
id: musicToolbarFullProgressContainer
484
anchors.left: parent.left
485
anchors.leftMargin: units.gu(3)
486
anchors.right: parent.right
487
anchors.rightMargin: units.gu(3)
488
anchors.top: parent.top
489
anchors.topMargin: units.gu(1)
495
id: musicToolbarFullPositionLabel
496
anchors.top: progressSliderMusic.bottom
497
anchors.topMargin: units.gu(-2)
498
anchors.left: parent.left
499
color: styleMusic.nowPlaying.labelSecondaryColor
501
height: parent.height
502
horizontalAlignment: Text.AlignHCenter
503
text: durationToString(player.position)
504
verticalAlignment: Text.AlignVCenter
509
id: progressSliderMusic
510
anchors.left: parent.left
511
anchors.right: parent.right
512
maximumValue: player.duration // load value at startup
513
objectName: "progressSliderShape"
514
style: UbuntuBlueSliderStyle {}
515
value: player.position // load value at startup
517
function formatValue(v) {
518
if (seeking) { // update position label while dragging
519
musicToolbarFullPositionLabel.text = durationToString(v)
522
return durationToString(v)
525
property bool seeking: false
526
property bool seeked: false
529
if (seeking === false) {
530
musicToolbarFullPositionLabel.text = durationToString(player.position)
541
musicToolbarFullPositionLabel.text = durationToString(value)
548
// seeked is a workaround for bug 1310706 as the first position after a seek is sometimes invalid (0)
549
if (progressSliderMusic.seeking === false && !progressSliderMusic.seeked) {
550
musicToolbarFullPositionLabel.text = durationToString(player.position)
551
musicToolbarFullDurationLabel.text = durationToString(player.duration)
553
progressSliderMusic.value = player.position
554
progressSliderMusic.maximumValue = player.duration
557
progressSliderMusic.seeked = false;
560
musicToolbarFullPositionLabel.text = durationToString(0);
561
musicToolbarFullDurationLabel.text = durationToString(0);
568
id: musicToolbarFullDurationLabel
569
anchors.top: progressSliderMusic.bottom
570
anchors.topMargin: units.gu(-2)
571
anchors.right: parent.right
572
color: styleMusic.nowPlaying.labelSecondaryColor
574
height: parent.height
575
horizontalAlignment: Text.AlignHCenter
576
text: durationToString(player.duration)
577
verticalAlignment: Text.AlignVCenter
582
587
/* Repeat button */
584
589
id: nowPlayingRepeatButton
697
702
opacity: player.shuffle && !emptyPage.noMusic ? 1 : .4
706
/* Object which provides the progress bar when in the queue */
708
id: playerControlsProgressBar
710
bottom: parent.bottom
714
color: styleMusic.common.black
715
height: units.gu(0.25)
719
id: playerControlsProgressBarHint
722
bottom: parent.bottom
724
color: UbuntuColors.blue
725
height: parent.height
731
playerControlsProgressBarHint.width = (player.position / player.duration) * playerControlsProgressBar.width
734
playerControlsProgressBarHint.width = 0;