add clock, fix font
This commit is contained in:
parent
f8c432390b
commit
5634f9e158
4 changed files with 38 additions and 2 deletions
|
|
@ -4,8 +4,9 @@ import QtQuick
|
|||
import qs
|
||||
import qs.widgets
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
WrapperRectangle {
|
||||
id: root
|
||||
clip: true
|
||||
color: Colors.base01
|
||||
required property int barHeight
|
||||
required property double vertMargin
|
||||
|
|
|
|||
|
|
@ -35,6 +35,17 @@ Variants {
|
|||
Layout.fillWidth: false
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: centerLayout
|
||||
anchors.centerIn: parent
|
||||
spacing: 5
|
||||
Clock {
|
||||
vertMargin: barHeight / 4 - 4
|
||||
barHeight: root.implicitHeight
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: rightLayout
|
||||
anchors.right: parent.right
|
||||
|
|
|
|||
24
modules/bar/Clock.qml
Normal file
24
modules/bar/Clock.qml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
import QtQuick
|
||||
import qs
|
||||
import qs.widgets
|
||||
|
||||
WrapperRectangle {
|
||||
id: root
|
||||
clip: true
|
||||
color: Colors.base01
|
||||
required property int barHeight
|
||||
required property double vertMargin
|
||||
topMargin: vertMargin
|
||||
bottomMargin: vertMargin
|
||||
leftMargin: 8
|
||||
rightMargin: 8
|
||||
SystemClock {
|
||||
id: clock
|
||||
precision: SystemClock.Seconds
|
||||
}
|
||||
child: StyledText {
|
||||
text: Qt.formatDateTime(clock.date, "d.M.yy hh:mm")
|
||||
}
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@ import QtQuick
|
|||
import qs
|
||||
|
||||
Text {
|
||||
font.family: "Adwaita Mono Nerd Font"
|
||||
font.family: "Adwaita Mono Nerd Font Propo"
|
||||
font.pixelSize: 12
|
||||
color: Colors.base07
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue