refactor: bar clock use anchors
This commit is contained in:
parent
01d9c31859
commit
398c508f99
1 changed files with 6 additions and 8 deletions
|
|
@ -4,27 +4,25 @@ import "root:/config"
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
BoxLayout {
|
StyledRect {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property color colour: Appearance.colours.peach
|
readonly property color colour: Appearance.colours.peach
|
||||||
|
|
||||||
padding: [Appearance.padding.smaller, 0]
|
|
||||||
|
|
||||||
MaterialIcon {
|
MaterialIcon {
|
||||||
|
id: icon
|
||||||
|
|
||||||
text: "calendar_month"
|
text: "calendar_month"
|
||||||
color: root.colour
|
color: root.colour
|
||||||
|
|
||||||
Layout.alignment: Layout.Center
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
AnchorText {
|
||||||
|
prevAnchor: icon
|
||||||
|
|
||||||
horizontalAlignment: StyledText.AlignHCenter
|
horizontalAlignment: StyledText.AlignHCenter
|
||||||
text: root.vertical ? Time.format("hh\nmm") : Time.format("dd/MM/yy hh:mm")
|
text: root.vertical ? Time.format("hh\nmm") : Time.format("dd/MM/yy hh:mm")
|
||||||
font.pointSize: Appearance.font.size.smaller
|
font.pointSize: Appearance.font.size.smaller
|
||||||
font.family: Appearance.font.family.mono
|
font.family: Appearance.font.family.mono
|
||||||
color: root.colour
|
color: root.colour
|
||||||
|
|
||||||
Layout.alignment: Layout.Center
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue