mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Bar: Improve centering by computing pixel perfect coordinates. All basic widgets + workspace.
This commit is contained in:
+6
-6
@@ -211,7 +211,7 @@ Item {
|
||||
|
||||
// Top section (left widgets)
|
||||
ColumnLayout {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
x: Style.pixelAlignCenter(parent.width, width)
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Style.marginM
|
||||
spacing: Style.marginS
|
||||
@@ -238,7 +238,7 @@ Item {
|
||||
|
||||
// Center section (center widgets)
|
||||
ColumnLayout {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
x: Style.pixelAlignCenter(parent.width, width)
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: Style.marginS
|
||||
|
||||
@@ -264,7 +264,7 @@ Item {
|
||||
|
||||
// Bottom section (right widgets)
|
||||
ColumnLayout {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
x: Style.pixelAlignCenter(parent.width, width)
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: Style.marginM
|
||||
spacing: Style.marginS
|
||||
@@ -304,7 +304,7 @@ Item {
|
||||
objectName: "leftSection"
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Style.marginS
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
y: Style.pixelAlignCenter(parent.height, height)
|
||||
spacing: Style.marginS
|
||||
|
||||
Repeater {
|
||||
@@ -332,7 +332,7 @@ Item {
|
||||
id: centerSection
|
||||
objectName: "centerSection"
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
y: Style.pixelAlignCenter(parent.height, height)
|
||||
spacing: Style.marginS
|
||||
|
||||
Repeater {
|
||||
@@ -361,7 +361,7 @@ Item {
|
||||
objectName: "rightSection"
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Style.marginS
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
y: Style.pixelAlignCenter(parent.height, height)
|
||||
spacing: Style.marginS
|
||||
|
||||
Repeater {
|
||||
|
||||
Reference in New Issue
Block a user