summaryrefslogtreecommitdiff
path: root/bar/Power.qml
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-07-13 21:51:30 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-07-13 21:51:30 +0800
commite86931545352387e7a8c5929dee2e9934d042800 (patch)
tree52935af186e3592241bc9096e093e9d34bb0c365 /bar/Power.qml
parent8e31e45ffa1b0029c91556ca29337eb7162dfd1d (diff)
finish style bar(almost)
Diffstat (limited to 'bar/Power.qml')
-rw-r--r--bar/Power.qml72
1 files changed, 45 insertions, 27 deletions
diff --git a/bar/Power.qml b/bar/Power.qml
index f9a74ed..581e725 100644
--- a/bar/Power.qml
+++ b/bar/Power.qml
@@ -7,36 +7,54 @@ import qs.config as Config
import qs.components
Item {
- id: root
- RowLayout {
- Item {
- Layout.fillWidth: true
- }
- anchors.fill: parent
- spacing: Config.Bar.resourceIconTextSpacing
+ implicitWidth: container.implicitWidth
+ implicitHeight: container.implicitHeight
- Icons {
- text: Config.Icons.power.shutdown
- }
+ Rectangle {
+ id: container
- Icons {
- text: Config.Icons.power.dpms
+ anchors {
+ fill: parent
+ verticalCenter: parent.verticalCenter
+ horizontalCenter: parent.horizontalCenter
}
-
- Icons {
- text: Config.Icons.power.lock
- }
-
- Icons {
- text: Config.Icons.power.suspend
- }
-
- Icons {
- text: Config.Icons.power.reboot
- }
-
- Item {
- Layout.fillWidth: true
+ implicitWidth: layout.implicitWidth + Config.General.rectMargin * 2
+ implicitHeight: Config.Bar.height - Config.General.rectMargin
+
+ color: Config.Colors.alt
+ radius: Config.Style.rounding.large
+
+ RowLayout {
+ id: layout
+ Item {
+ Layout.fillWidth: true
+ }
+ anchors.fill: parent
+ spacing: Config.Bar.resourceIconTextSpacing
+
+ Icons {
+ text: Config.Icons.power.shutdown
+ }
+
+ Icons {
+ text: Config.Icons.power.dpms
+ }
+
+ Icons {
+ text: Config.Icons.power.lock
+ }
+
+ Icons {
+ text: Config.Icons.power.suspend
+ }
+
+ Icons {
+ text: Config.Icons.power.reboot
+ }
+
+ Item {
+ Layout.fillWidth: true
+ }
}
}
}