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.Layouts
|
||||
|
||||
BoxLayout {
|
||||
StyledRect {
|
||||
id: root
|
||||
|
||||
readonly property color colour: Appearance.colours.peach
|
||||
|
||||
padding: [Appearance.padding.smaller, 0]
|
||||
|
||||
MaterialIcon {
|
||||
id: icon
|
||||
|
||||
text: "calendar_month"
|
||||
color: root.colour
|
||||
|
||||
Layout.alignment: Layout.Center
|
||||
}
|
||||
|
||||
StyledText {
|
||||
AnchorText {
|
||||
prevAnchor: icon
|
||||
|
||||
horizontalAlignment: StyledText.AlignHCenter
|
||||
text: root.vertical ? Time.format("hh\nmm") : Time.format("dd/MM/yy hh:mm")
|
||||
font.pointSize: Appearance.font.size.smaller
|
||||
font.family: Appearance.font.family.mono
|
||||
color: root.colour
|
||||
|
||||
Layout.alignment: Layout.Center
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue