* add month/year and paging to calendar also, removed day/month from time panel, and highlighting weekends (need to figure out why the weekday enum is incorrect. locale issue?) * removing dayOfWeek offset hack this is clearly a me problem. my locale appears to be set to dz, but only for caelestia shell. not sure why. * aesthetic and localization improvements * ensure all localized dates use UTC issues i was having wrt localized date and day-of-week being off by one appear to have been due to my timezone. forcing UTC seems to fix this. * fixes * anim today indicator * keep state across open/close * fix --------- Co-authored-by: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
68 lines
2 KiB
QML
68 lines
2 KiB
QML
pragma ComponentBehavior: Bound
|
|
|
|
import qs.components
|
|
import qs.services
|
|
import qs.config
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
|
|
Item {
|
|
id: root
|
|
|
|
readonly property list<string> timeComponents: Time.format(Config.services.useTwelveHourClock ? "hh:mm:A" : "hh:mm").split(":")
|
|
|
|
anchors.top: parent.top
|
|
anchors.bottom: parent.bottom
|
|
implicitWidth: Config.dashboard.sizes.dateTimeWidth
|
|
|
|
ColumnLayout {
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
spacing: 0
|
|
|
|
StyledText {
|
|
Layout.bottomMargin: -(font.pointSize * 0.4)
|
|
Layout.alignment: Qt.AlignHCenter
|
|
text: root.timeComponents[0]
|
|
color: Colours.palette.m3secondary
|
|
font.pointSize: Appearance.font.size.extraLarge
|
|
font.family: Appearance.font.family.clock
|
|
font.weight: 600
|
|
}
|
|
|
|
StyledText {
|
|
Layout.alignment: Qt.AlignHCenter
|
|
text: "•••"
|
|
color: Colours.palette.m3primary
|
|
font.pointSize: Appearance.font.size.extraLarge * 0.9
|
|
font.family: Appearance.font.family.clock
|
|
}
|
|
|
|
StyledText {
|
|
Layout.topMargin: -(font.pointSize * 0.4)
|
|
Layout.alignment: Qt.AlignHCenter
|
|
text: root.timeComponents[1]
|
|
color: Colours.palette.m3secondary
|
|
font.pointSize: Appearance.font.size.extraLarge
|
|
font.family: Appearance.font.family.clock
|
|
font.weight: 600
|
|
}
|
|
|
|
Loader {
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
asynchronous: true
|
|
active: Config.services.useTwelveHourClock
|
|
visible: active
|
|
|
|
sourceComponent: StyledText {
|
|
text: root.timeComponents[2] ?? ""
|
|
color: Colours.palette.m3primary
|
|
font.pointSize: Appearance.font.size.large
|
|
font.family: Appearance.font.family.clock
|
|
font.weight: 600
|
|
}
|
|
}
|
|
}
|
|
}
|