forked from Shinonome/dots-hyprland
refactor flexible grids into Box
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import qs.modules.common
|
||||
import qs.modules.common.widgets
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
@@ -23,9 +24,9 @@ Item {
|
||||
radius: Appearance.rounding.small
|
||||
}
|
||||
|
||||
GridLayout {
|
||||
BoxLayout {
|
||||
id: gridLayout
|
||||
columns: root.vertical ? 1 : -1
|
||||
vertical: root.vertical
|
||||
anchors {
|
||||
verticalCenter: root.vertical ? undefined : parent.verticalCenter
|
||||
horizontalCenter: root.vertical ? parent.horizontalCenter : undefined
|
||||
|
||||
@@ -65,9 +65,9 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
GridLayout {
|
||||
BoxLayout {
|
||||
id: gridLayout
|
||||
columns: root.vertical ? 1 : -1
|
||||
vertical: root.vertical
|
||||
anchors.fill: parent
|
||||
rowSpacing: 8
|
||||
columnSpacing: 15
|
||||
|
||||
@@ -82,14 +82,13 @@ Item {
|
||||
}
|
||||
|
||||
// Workspaces - background
|
||||
Grid {
|
||||
Box {
|
||||
z: 1
|
||||
anchors.centerIn: parent
|
||||
|
||||
rowSpacing: 0
|
||||
columnSpacing: 0
|
||||
columns: root.vertical ? 1 : -1
|
||||
rows: root.vertical ? -1 : 1
|
||||
vertical: root.vertical
|
||||
|
||||
Repeater {
|
||||
model: wsModel.shownCount
|
||||
@@ -160,13 +159,12 @@ Item {
|
||||
}
|
||||
|
||||
// Workspaces - numbers
|
||||
Grid {
|
||||
Box {
|
||||
id: wsNumbers
|
||||
z: 3
|
||||
anchors.fill: parent
|
||||
|
||||
columns: root.vertical ? 1 : -1
|
||||
rows: root.vertical ? -1 : 1
|
||||
vertical: root.vertical
|
||||
columnSpacing: 0
|
||||
rowSpacing: 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user