diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-07-11 14:50:36 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-07-11 14:50:36 +0800 |
| commit | 7cdb76f8310ffba13ea6dbd02416c76ac81f9add (patch) | |
| tree | a53dbcca0ff49fb6dda0711bd80d95d208f33503 | |
| parent | fcb01c5fe06d19f33eb17c0b41f2ec49a5eeb500 (diff) | |
fix layout + new import root:/ syntax
| -rw-r--r-- | bar/Bar.qml | 65 | ||||
| -rw-r--r-- | bar/Workspace.qml | 5 | ||||
| -rw-r--r-- | services/Hyprland.qml | 2 |
3 files changed, 47 insertions, 25 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 - // } } - } } } diff --git a/bar/Workspace.qml b/bar/Workspace.qml index afdc776..fd9d521 100644 --- a/bar/Workspace.qml +++ b/bar/Workspace.qml @@ -1,12 +1,11 @@ import QtQuick.Layouts import QtQuick import Quickshell -import "../services" -import "../config" +import qs.services +import qs.config Item { Layout.fillHeight: true - Layout.preferredWidth: parent.width / 3 property list<bool> workspaceOccupied: [] diff --git a/services/Hyprland.qml b/services/Hyprland.qml index ea07b65..dfbc874 100644 --- a/services/Hyprland.qml +++ b/services/Hyprland.qml @@ -3,7 +3,7 @@ pragma Singleton import Quickshell import Quickshell.Hyprland import QtQuick -import "../config" +import qs.config Singleton { id: root |
