Bar: Improve centering by computing pixel perfect coordinates. All basic widgets + workspace.

This commit is contained in:
Lemmy
2025-12-29 22:08:48 -05:00
parent b991feaff0
commit 50685937da
5 changed files with 71 additions and 58 deletions
+6 -6
View File
@@ -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 {