summaryrefslogtreecommitdiff
path: root/bar/Bar.qml
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-07-11 14:50:36 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-07-11 14:50:36 +0800
commit7cdb76f8310ffba13ea6dbd02416c76ac81f9add (patch)
treea53dbcca0ff49fb6dda0711bd80d95d208f33503 /bar/Bar.qml
parentfcb01c5fe06d19f33eb17c0b41f2ec49a5eeb500 (diff)
fix layout + new import root:/ syntax
Diffstat (limited to 'bar/Bar.qml')
-rw-r--r--bar/Bar.qml65
1 files changed, 44 insertions, 21 deletions
diff --git a/bar/Bar.qml b/bar/Bar.qml
index f28b836..4bb56e5 100644
--- a/bar/Bar.qml
+++ b/bar/Bar.qml
@@ -1,8 +1,8 @@
-import "../utils"
-import "../config"
import QtQuick
import Quickshell
import QtQuick.Layouts
+import qs.utils
+import qs.config
Scope {
id: root
@@ -11,7 +11,7 @@ Scope {
model: Quickshell.screens
IWindow {
- name: "Bar"
+ name: "Bar"
anchors {
top: true
@@ -24,7 +24,7 @@ Scope {
id: child
radius: Bar.borderRadius
implicitHeight: Bar.height
- implicitWidth: parent.width
+ implicitWidth: parent.width
anchors {
left: parent.left
@@ -36,26 +36,49 @@ Scope {
rightMargin: Bar.rightMargin
}
RowLayout {
- anchors {
- fill: parent
- left: parent.left
- }
- Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
- id: row
+ id: rowLayout
+ anchors.fill: parent
+
+ RowLayout {
+ id: leftRow
+ Layout.preferredWidth: 1
+ Layout.fillWidth: true
+ // Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
- Workspace {
- id: workspace
+ Workspace {
+ id: workspace
+ Layout.preferredWidth: 3
+ Layout.fillWidth: true
+ }
+ Mpris {
+ id: mpris
+ Layout.fillWidth: true
+ Layout.preferredWidth: 1
+ }
+ }
+ RowLayout {
+ id: centerRow
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ Layout.preferredWidth: 1
+ Rectangle {
+ Layout.fillWidth: true
+ implicitHeight: 1
+ color: "#000000"
+ }
+ }
+ RowLayout {
+ id: rightRow
+ Layout.fillWidth: true
+ Layout.preferredWidth: 1
+ Rectangle {
+ Layout.fillWidth: true
+ Text {
+ text: "a"
+ }
+ }
}
- // Workspace {
- //
- // id: workspace2
- // }
- // Workspace {
- //
- // id: workspace3
- // }
}
-
}
}
}