From 6c47b43925977fd203b82140bc1e6fd46765aecf Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 12 Jul 2025 23:06:50 +0800 Subject: timedate --- bar/Bar.qml | 6 +++++- bar/TimeDate.qml | 27 +++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 bar/TimeDate.qml (limited to 'bar') diff --git a/bar/Bar.qml b/bar/Bar.qml index 31d9c78..df4c081 100644 --- a/bar/Bar.qml +++ b/bar/Bar.qml @@ -1,7 +1,7 @@ import QtQuick import Quickshell import QtQuick.Layouts -import qs.utils +import qs.components import qs.config Scope { @@ -76,6 +76,10 @@ Scope { implicitWidth: (child.width - centerRow.width) / 2 implicitHeight: child.height + TimeDate { + Layout.fillHeight: true + Layout.fillWidth: true + } Network { Layout.fillHeight: true Layout.fillWidth: true diff --git a/bar/TimeDate.qml b/bar/TimeDate.qml new file mode 100644 index 0000000..93da141 --- /dev/null +++ b/bar/TimeDate.qml @@ -0,0 +1,27 @@ +import QtQuick +import QtQuick.Layouts + +import qs.services as Services +import qs.utils +import qs.config as Config + +Item { + id: root + RowLayout { + Item { + Layout.fillWidth: true + } + anchors.fill: parent + spacing: Config.Bar.resourceIconTextSpacing + + Icons { + text: Config.Icons.resource.clock + } + Text { + text: Services.TimeDate.time + } + Item { + Layout.fillWidth: true + } + } +} -- cgit v1.2.3