From 299bf0bae8be6ab505f97d6aba4f82e4e6f96f62 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 12 Jul 2025 18:15:32 +0800 Subject: lot of minor improvement added utils and working networkusage --- bar/Network.qml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 bar/Network.qml (limited to 'bar/Network.qml') diff --git a/bar/Network.qml b/bar/Network.qml new file mode 100644 index 0000000..df70ecd --- /dev/null +++ b/bar/Network.qml @@ -0,0 +1,34 @@ +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: Services.Network.state + } + Text { + text: Math.round(Services.Resource.cpuUsage * 100) + } + Text { + text: NetworkUsage.up + " " + NetworkUsage.upUnit + } + Text { + text: NetworkUsage.down + " " + NetworkUsage.downUnit + } + Item { + Layout.fillWidth: true + } + } +} -- cgit v1.2.3