Now cover is complete.

This commit is contained in:
2017-08-24 22:27:56 +02:00
parent 08cca3e186
commit 2ec663d48b
3 changed files with 90 additions and 18 deletions

View File

@@ -30,23 +30,77 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
import Pw.Unitoo.Backend 1.0
import "../pages/js/helpers.js" as Helper
CoverBackground {
Label {
id: label
anchors.centerIn: parent
text: qsTr("My Cover")
id: coverPage
Column{
width: coverPage.width
SectionHeader { text: boxingTimer.preset }
Label {
width: parent.width
horizontalAlignment: Text.AlignHCenter
font.pixelSize: Theme.fontSizeHuge
text: boxingTimer.remainingTimeToString
color: boxingTimer.status === BoxingTimer.Rest ? Theme.secondaryColor : Theme.primaryColor
}
Item { width: 25; height: 25 }
Separator {
height: 10
horizontalAlignment: Qt.AlignHCenter
color: boxingTimer.isActive ? "green" : "red"
anchors {
left: parent.left
right: parent.right
margins: Theme.paddingMedium
}
}
Item { width: 25; height: 25 }
Label {
id: roundLabel
width: parent.width
horizontalAlignment: Text.AlignHCenter
font.pixelSize: Theme.fontSizeExtraLarge
text: boxingTimer.roundsToString
}
}
CoverActionList {
id: coverAction
CoverAction {
iconSource: "image://theme/icon-cover-next"
iconSource: "image://theme/icon-cover-refresh"
onTriggered: boxingTimer.status = BoxingTimer.Reset
}
CoverAction {
iconSource: "image://theme/icon-cover-pause"
iconSource: "image://theme/icon-cover-cancel"
onTriggered: boxingTimer.status = BoxingTimer.Stop
}
CoverAction {
iconSource: boxingTimer.isActive ?
"image://theme/icon-cover-pause" :
"image://theme/icon-cover-play"
onTriggered: Helper.playPauseTimer()
}
}
}