fix misaligned widgets

This commit is contained in:
Sakooooo 2025-01-10 18:37:18 +04:00
parent a545f3a7fa
commit fae67af4b2
Signed by: sako
GPG key ID: FE52FD65B76E4751
3 changed files with 15 additions and 12 deletions

View file

@ -6,9 +6,8 @@ import Quickshell
ListView { ListView {
id: root id: root
height: 110 height: 70
width: 60 width: 60
anchors.centerIn: parent
SystemClock { SystemClock {
id: clock id: clock
precision: SystemClock.Minutes precision: SystemClock.Minutes
@ -20,8 +19,9 @@ ListView {
anchors.centerIn: parent anchors.centerIn: parent
Rectangle { Rectangle {
width: 50 width: 60
height: 60 height: 60
radius: 3
anchors.centerIn: parent anchors.centerIn: parent
Text { Text {
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter

View file

@ -14,16 +14,15 @@ ListView {
model: workspaceArray model: workspaceArray
anchors.top: parent.top anchors.top: parent.top
anchors.centerIn: parent height: 150
height: 110
width: 60 width: 60
spacing: 2 spacing: 5
delegate: Item { delegate: Item {
width: Math.max((modelData.active) ? 50 : 40, 50) width: Math.max((modelData.active) ? 70 : 40, 70)
height: 10 height: 10
Rectangle { Rectangle {
id: workspace id: workspace
width: (modelData.active) ? 50 : 40 width: (modelData.active) ? 60 : 45
height: 10 height: 10
radius: height / 2 radius: height / 2
border.width: 2 border.width: 2

View file

@ -29,6 +29,13 @@ ShellRoot {
color: "#222222" color: "#222222"
screen: modelData screen: modelData
margins {
top: 10
bottom: 10
left: 10
}
anchors { anchors {
top: true; top: true;
bottom: true; bottom: true;
@ -48,9 +55,6 @@ ShellRoot {
Workspaces {} Workspaces {}
Text {
text: "hi"
}
} }
// Center // Center
@ -68,7 +72,7 @@ ShellRoot {
RowLayout { RowLayout {
/* anchors.right: parent.right */ /* anchors.right: parent.right */
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
spacing: 5 /* spacing: 5 */
Battery { } Battery { }
Time { } Time { }