summaryrefslogtreecommitdiff
path: root/metawatch
diff options
context:
space:
mode:
Diffstat (limited to 'metawatch')
-rw-r--r--metawatch/qml/com/javispedro/sowatch/metawatch/MWLabel.qml2
-rw-r--r--metawatch/qml/com/javispedro/sowatch/metawatch/MWTitle.qml42
2 files changed, 36 insertions, 8 deletions
diff --git a/metawatch/qml/com/javispedro/sowatch/metawatch/MWLabel.qml b/metawatch/qml/com/javispedro/sowatch/metawatch/MWLabel.qml
index 3ce64ca..5bf8ff1 100644
--- a/metawatch/qml/com/javispedro/sowatch/metawatch/MWLabel.qml
+++ b/metawatch/qml/com/javispedro/sowatch/metawatch/MWLabel.qml
@@ -2,5 +2,5 @@ import Qt 4.7
Text {
font.family: "MetaWatch Large 16pt"
- font.pointSize: 10.5
+ font.pixelSize: 14
}
diff --git a/metawatch/qml/com/javispedro/sowatch/metawatch/MWTitle.qml b/metawatch/qml/com/javispedro/sowatch/metawatch/MWTitle.qml
index b87d535..b5ad787 100644
--- a/metawatch/qml/com/javispedro/sowatch/metawatch/MWTitle.qml
+++ b/metawatch/qml/com/javispedro/sowatch/metawatch/MWTitle.qml
@@ -1,24 +1,52 @@
import Qt 4.7
+import com.javispedro.sowatch 1.0
Rectangle {
width: 96
- height: 16
+ height: time.height + (title.visible ? 16 : 0)
- property alias text: label.text
- property alias font: label.font
+ property alias text: title.text
+ property alias font: title.font
property alias icon: image
+ clip: true
+
Image {
id: image
+ anchors.top: time.bottom
anchors.left: parent.left
- anchors.top: parent.top
}
MWLabel {
- id: label
+ id: title
+ anchors.top: time.bottom
anchors.left: image.right
anchors.leftMargin: 2
- anchors.verticalCenter: parent.verticalCenter
- font.pointSize: 12
+ font.pixelSize: 16
+ visible: text != ""
+ }
+
+ MWLabel {
+ id: time
+ anchors.right: parent.right
+ anchors.rightMargin: 1
+ anchors.top: parent.top
+ height: 8
+ font.family: "MetaWatch Large caps 8pt"
+ font.pixelSize: 8
+ text: " : "
+ }
+
+ function updateStatusBar() {
+ var now = new Date
+ time.text = Qt.formatDate(now, "ddd") + " " + Qt.formatTime(now)
+ }
+
+ Timer {
+ triggeredOnStart: true
+ interval: 100000
+ repeat: true
+ running: watch.active
+ onTriggered: updateStatusBar()
}
}