diff --git a/modules/bar/ActiveWindow.qml b/modules/bar/ActiveWindow.qml index 81c7213..758da19 100644 --- a/modules/bar/ActiveWindow.qml +++ b/modules/bar/ActiveWindow.qml @@ -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 diff --git a/modules/bar/Bar.qml b/modules/bar/Bar.qml index c61942a..2b93e65 100644 --- a/modules/bar/Bar.qml +++ b/modules/bar/Bar.qml @@ -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 diff --git a/modules/bar/Clock.qml b/modules/bar/Clock.qml new file mode 100644 index 0000000..e95cf46 --- /dev/null +++ b/modules/bar/Clock.qml @@ -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") + } +} diff --git a/widgets/StyledText.qml b/widgets/StyledText.qml index 17cc97f..20599e9 100644 --- a/widgets/StyledText.qml +++ b/widgets/StyledText.qml @@ -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 }