me like nix
1import QtQuick
2import "../../../config" as Config
3
4Item {
5 id: root
6 signal clicked()
7
8 width: 40
9 implicitHeight: clockText.implicitHeight
10
11 Text {
12 id: clockText
13 anchors.horizontalCenter: parent.horizontalCenter
14 horizontalAlignment: Text.AlignHCenter
15 color: Config.Colours.blue
16 font.family: Config.Appearance.font.family
17 font.pixelSize: 16
18 font.bold: true
19 lineHeight: 1.0
20 text: Qt.formatDateTime(new Date(), "HH\nmm")
21 }
22
23 Timer {
24 interval: 1000
25 running: true
26 repeat: true
27 onTriggered: clockText.text = Qt.formatDateTime(new Date(), "HH\nmm")
28 }
29
30 MouseArea {
31 anchors.fill: parent
32 cursorShape: Qt.PointingHandCursor
33 onClicked: root.clicked()
34 }
35}