PlayerPage: Seek button, auto-fire, truncation
This commit is contained in:
parent
10543d29d0
commit
709a5c1f0c
2 changed files with 50 additions and 36 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 61863f14e31850b2bfafda8c65fca439a070e91f
|
||||
Subproject commit 55c5c8d74d112f6b349b1e3418fac331e39505b2
|
|
@ -21,6 +21,7 @@
|
|||
import QtQuick 2.0
|
||||
import Sailfish.Silica 1.0
|
||||
|
||||
import 'common'
|
||||
import 'common/util.js' as Util
|
||||
|
||||
Page {
|
||||
|
@ -150,6 +151,53 @@ Page {
|
|||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
anchors {
|
||||
right: parent.right
|
||||
margins: Theme.paddingMedium
|
||||
}
|
||||
|
||||
height: Theme.itemSizeLarge
|
||||
spacing: Theme.paddingMedium
|
||||
|
||||
IconMenuItem {
|
||||
text: '- 1 min'
|
||||
icon.source: 'image://theme/icon-m-previous'
|
||||
|
||||
GPodderAutoFire {
|
||||
running: parent.down
|
||||
onFired: player.seekAndSync(player.position - 1000 * 60)
|
||||
}
|
||||
}
|
||||
|
||||
IconMenuItem {
|
||||
text: '- 10 sec'
|
||||
icon.source: 'image://theme/icon-m-previous'
|
||||
GPodderAutoFire {
|
||||
running: parent.down
|
||||
onFired: player.seekAndSync(player.position - 1000 * 10)
|
||||
}
|
||||
}
|
||||
|
||||
IconMenuItem {
|
||||
text: '+ 10 sec'
|
||||
icon.source: 'image://theme/icon-m-next'
|
||||
GPodderAutoFire {
|
||||
running: parent.down
|
||||
onFired: player.seekAndSync(player.position + 1000 * 10)
|
||||
}
|
||||
}
|
||||
|
||||
IconMenuItem {
|
||||
text: '+ 1 min'
|
||||
icon.source: 'image://theme/icon-m-next'
|
||||
GPodderAutoFire {
|
||||
running: parent.down
|
||||
onFired: player.seekAndSync(player.position + 1000 * 60)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SectionHeader {
|
||||
text: 'Play queue'
|
||||
visible: playQueueRepeater.count > 0
|
||||
|
@ -189,6 +237,7 @@ Page {
|
|||
}
|
||||
|
||||
text: modelData.title
|
||||
truncationMode: TruncationMode.Fade
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
|
@ -196,41 +245,6 @@ Page {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
width: parent.width
|
||||
height: Theme.itemSizeLarge
|
||||
}
|
||||
|
||||
TimePicker {
|
||||
hourMode: DateTime.TwentyFourHours
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
property int oldHour: hour
|
||||
property int oldMinute: minute
|
||||
|
||||
onHourChanged: {
|
||||
var diff = hour - oldHour;
|
||||
if (diff > 12) {
|
||||
diff -= 24;
|
||||
} else if (diff < -12) {
|
||||
diff += 24;
|
||||
}
|
||||
player.seekAndSync(player.position + 1000 * 60 * diff);
|
||||
oldHour = hour;
|
||||
}
|
||||
|
||||
onMinuteChanged: {
|
||||
var diff = minute - oldMinute;
|
||||
if (diff > 30) {
|
||||
diff -= 60;
|
||||
} else if (diff < -30) {
|
||||
diff += 60;
|
||||
}
|
||||
player.seekAndSync(player.position + 1000 * 10 * diff);
|
||||
oldMinute = minute;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue