diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-07-13 22:40:13 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-07-13 22:40:13 +0800 |
| commit | 6487f0a1778efc94f192326c1048f3d05d1b408f (patch) | |
| tree | 17b1a14bb03865fa9437300e458f93b37ab7cbc9 /bar | |
| parent | f0b03a1611181b8ff20fc8698bcdb8fa267d23c9 (diff) | |
finish styled top bar
Diffstat (limited to 'bar')
| -rw-r--r-- | bar/Bar.qml | 8 | ||||
| -rw-r--r-- | bar/Mpris.qml | 6 | ||||
| -rw-r--r-- | bar/Network.qml | 8 | ||||
| -rw-r--r-- | bar/Power.qml | 36 | ||||
| -rw-r--r-- | bar/TimeDate.qml | 2 |
5 files changed, 33 insertions, 27 deletions
diff --git a/bar/Bar.qml b/bar/Bar.qml index 39cb256..f35c07b 100644 --- a/bar/Bar.qml +++ b/bar/Bar.qml @@ -12,7 +12,7 @@ Scope { IWindow { id: barWindow - name: "Bar" + name: "quickshell:bar" anchors { top: true @@ -108,9 +108,9 @@ Scope { Power { id: power } - Tray { - id: tray - } + // Tray { + // id: tray + // } TimeDate { id: timeDate } diff --git a/bar/Mpris.qml b/bar/Mpris.qml index a3145aa..b85b064 100644 --- a/bar/Mpris.qml +++ b/bar/Mpris.qml @@ -4,6 +4,7 @@ import Quickshell import Quickshell.Services.Mpris import qs.services as Services import qs.config +import qs.components // import Quickshell.Utils @@ -53,14 +54,13 @@ Item { id: rect anchors.verticalCenter: parent.verticalCenter // TODO: move to IRect - implicitWidth: text.width + General.rectMargin * 2 + implicitWidth: text.width + General.rectMargin * 4 height: parent.height - General.rectMargin color: Colors.alt radius: Style.rounding.smaller - Text { + IText { id: text // TODO: use IText - font.pixelSize: General.fontSize anchors.centerIn: parent anchors.verticalCenter: parent.verticalCenter text: root.state + " " + root.cleanedTitle + " [" + root.progress + "]" diff --git a/bar/Network.qml b/bar/Network.qml index 14e8851..ae1eace 100644 --- a/bar/Network.qml +++ b/bar/Network.qml @@ -41,19 +41,19 @@ Item { RowLayout { spacing: Config.Bar.resourceIconTextSpacing / 2 - Text { + IText { text: Config.Icons.resource.network.download } - Text { + IText { text: Services.NetworkUsage.down + Services.NetworkUsage.downUnit } } RowLayout { spacing: Config.Bar.resourceIconTextSpacing / 2 - Text { + IText { text: Config.Icons.resource.network.upload } - Text { + IText { text: Services.NetworkUsage.up + Services.NetworkUsage.upUnit } } diff --git a/bar/Power.qml b/bar/Power.qml index 581e725..1eea3e1 100644 --- a/bar/Power.qml +++ b/bar/Power.qml @@ -34,23 +34,29 @@ Item { Icons { text: Config.Icons.power.shutdown + font.pixelSize: Config.Style.font.size.large + color: Qt.rgba(191, 97, 106, 1) } - Icons { - text: Config.Icons.power.dpms - } - - Icons { - text: Config.Icons.power.lock - } - - Icons { - text: Config.Icons.power.suspend - } - - Icons { - text: Config.Icons.power.reboot - } + // Icons { + // text: Config.Icons.power.dpms + // font.pixelSize: Config.Style.fontSize.large + // } + // + // Icons { + // text: Config.Icons.power.lock + // font.pixelSize: Config.Style.fontSize.large + // } + // + // Icons { + // text: Config.Icons.power.suspend + // font.pixelSize: Config.Style.fontSize.large + // } + // + // Icons { + // text: Config.Icons.power.reboot + // font.pixelSize: Config.Style.fontSize.large + // } Item { Layout.fillWidth: true diff --git a/bar/TimeDate.qml b/bar/TimeDate.qml index c3bf129..6b7ec59 100644 --- a/bar/TimeDate.qml +++ b/bar/TimeDate.qml @@ -34,7 +34,7 @@ Item { text: Config.Icons.resource.clock font.pixelSize: Config.Style.font.size.larger } - Text { + IText { text: Services.TimeDate.time } Item { |
