diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-07-12 18:15:32 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-07-12 18:15:32 +0800 |
| commit | 299bf0bae8be6ab505f97d6aba4f82e4e6f96f62 (patch) | |
| tree | e1a72a68b5c2fae7fab097a80462233878a3231c /bar/Network.qml | |
| parent | ce5f49a9324bceccab821c1d2ebf3f72bdfc09ea (diff) | |
lot of minor improvement added utils and working networkusage
Diffstat (limited to 'bar/Network.qml')
| -rw-r--r-- | bar/Network.qml | 34 |
1 files changed, 34 insertions, 0 deletions
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 + } + } +} |
