diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-07-11 22:03:04 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-07-11 22:03:04 +0800 |
| commit | 10c31b87eb470fc3329fa18b1fa48f8b031139a0 (patch) | |
| tree | b4fb380e8f738835a9725ca20c9a0b345a8ad669 | |
| parent | 0e4bdc7ed815ef389d9ca95fc4865f46701b1aaf (diff) | |
better alignment
| -rw-r--r-- | bar/Bar.qml | 8 | ||||
| -rw-r--r-- | bar/Mpris.qml | 3 | ||||
| -rw-r--r-- | bar/Workspace.qml | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/bar/Bar.qml b/bar/Bar.qml index 0dc49f5..f8d3a2d 100644 --- a/bar/Bar.qml +++ b/bar/Bar.qml @@ -48,9 +48,10 @@ Scope { Workspace { id: workspace - Layout.preferredWidth: 3 + Layout.preferredWidth: 5 Layout.fillHeight: true Layout.fillWidth: true + Layout.maximumWidth: 400 } Mpris { id: mpris @@ -58,6 +59,11 @@ Scope { Layout.fillHeight: true Layout.preferredWidth: 1 } + Item { + Layout.fillWidth: true + Layout.fillHeight: true + Layout.preferredWidth: 1 + } } RowLayout { id: centerRow diff --git a/bar/Mpris.qml b/bar/Mpris.qml index 880456b..5ebcb74 100644 --- a/bar/Mpris.qml +++ b/bar/Mpris.qml @@ -8,7 +8,6 @@ import qs.services Item { id: root - implicitWidth: parent.width height: Bar.height readonly property MprisPlayer activePlayer: SMpris.activePlayer readonly property string cleanedTitle: cleanMusicTitle(activePlayer?.trackTitle) || qsTr("No media") @@ -47,7 +46,7 @@ Item { } Text { - anchors.centerIn: parent + anchors.verticalCenter: parent.verticalCenter text: root.state + " " + root.cleanedTitle + " [" + root.progress + "]" } // hover diff --git a/bar/Workspace.qml b/bar/Workspace.qml index 04ad537..0b0c672 100644 --- a/bar/Workspace.qml +++ b/bar/Workspace.qml @@ -38,7 +38,7 @@ Item { RowLayout { id: layout implicitWidth: parent.width - height: Bar.height + anchors.verticalCenter: parent.verticalCenter spacing: 0 |
