Add MyDetailItem
This commit is contained in:
parent
c7ba509bc7
commit
99d8aecb7a
2 changed files with 20 additions and 5 deletions
|
@ -32,7 +32,8 @@ DISTFILES += qml/harbour-batterybuddy.qml \
|
|||
qml/pages/AboutPage.qml \
|
||||
qml/pages/InfoPage.qml \
|
||||
rpm/harbour-batterybuddy.changes \
|
||||
qml/components/BatteryGraph.qml
|
||||
qml/components/BatteryGraph.qml \
|
||||
qml/components/MyDetailItem.qml
|
||||
|
||||
SAILFISHAPP_ICONS = 86x86 108x108 128x128 172x172
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ import QtQuick 2.0
|
|||
import QtMultimedia 5.6
|
||||
import Sailfish.Silica 1.0
|
||||
import Nemo.Notifications 1.0
|
||||
import "../components"
|
||||
|
||||
Page {
|
||||
id: page
|
||||
|
@ -121,10 +122,23 @@ Page {
|
|||
+(battery.charging ? qsTr("yes") : qsTr("no"))+"\n"
|
||||
+statusText[battery.state]
|
||||
}
|
||||
Label {
|
||||
x: Theme.paddingLarge
|
||||
text: qsTr("Alert levels")
|
||||
color: Theme.highlightColor
|
||||
// Detail column
|
||||
Column {
|
||||
width: parent.width
|
||||
spacing: 0
|
||||
|
||||
MyDetailItem {
|
||||
label: qsTr("Charge:")
|
||||
value: battery.charge + "%"
|
||||
}
|
||||
MyDetailItem {
|
||||
label: qsTr("Charging:")
|
||||
value: battery.charging ? qsTr("yes") : qsTr("no")
|
||||
}
|
||||
MyDetailItem {
|
||||
label: qsTr("State:")
|
||||
value: statusText[battery.state]
|
||||
}
|
||||
}
|
||||
Label {
|
||||
x: Theme.paddingLarge*2
|
||||
|
|
Loading…
Reference in a new issue