blob: 53c1b36c4f6e1ab07736346d1104ba3721be536e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
pragma ComponentBehavior: Bound
import qs.widgets
import qs.services
import qs.config
import QtQuick
import QtQuick.Layouts
ColumnLayout {
id: root
spacing: 0
readonly property list<string> timeComponents: Time.format(Config.services.useTwelveHourClock ? "hh:mm:A" : "hh:mm").split(":")
RowLayout {
Layout.alignment: Qt.AlignHCenter
spacing: Appearance.spacing.small
StyledText {
Layout.alignment: Qt.AlignVCenter
text: root.timeComponents[0]
color: Colours.palette.m3secondary
font.pointSize: Appearance.font.size.extraLarge * 4
font.family: Appearance.font.family.mono
font.weight: 800
}
StyledText {
Layout.alignment: Qt.AlignVCenter
text: ":"
color: Colours.palette.m3primary
font.pointSize: Appearance.font.size.extraLarge * 4
font.family: Appearance.font.family.mono
font.weight: 800
}
StyledText {
Layout.alignment: Qt.AlignVCenter
text: root.timeComponents[1]
color: Colours.palette.m3secondary
font.pointSize: Appearance.font.size.extraLarge * 4
font.family: Appearance.font.family.mono
font.weight: 800
}
Loader {
Layout.leftMargin: Appearance.spacing.normal
Layout.alignment: Qt.AlignVCenter
asynchronous: true
active: Config.services.useTwelveHourClock
visible: active
sourceComponent: StyledText {
text: root.timeComponents[2] ?? ""
color: Colours.palette.m3primary
font.pointSize: Appearance.font.size.extraLarge * 3
font.weight: 700
}
}
}
StyledText {
Layout.alignment: Qt.AlignHCenter
Layout.bottomMargin: Appearance.padding.large * 3
text: Time.format("dddd, d MMMM yyyy")
color: Colours.palette.m3tertiary
font.pointSize: Appearance.font.size.extraLarge
font.family: Appearance.font.family.mono
font.bold: true
}
}
|