From 3764edafa883510a0190ab869be74eb69f7ad134 Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Sun, 14 Sep 2025 14:35:15 -0400 Subject: [PATCH] Widgets: improved centering --- Commons/Style.qml | 2 +- Modules/Bar/Bar.qml | 3 --- Widgets/NIconButton.qml | 5 ++--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Commons/Style.qml b/Commons/Style.qml index e712a7f..97f6258 100644 --- a/Commons/Style.qml +++ b/Commons/Style.qml @@ -66,7 +66,7 @@ Singleton { property int animationSlowest: Math.round(750 / Settings.data.general.animationSpeed) // Dimensions - property int barHeight: (Settings.data.bar.position === "left" || Settings.data.bar.position === "right") ? 39 : 36 + property int barHeight: (Settings.data.bar.position === "left" || Settings.data.bar.position === "right") ? 39 : 37 property int capsuleHeight: (barHeight * 0.73) property int baseWidgetSize: (barHeight * 0.9) property int sliderWidth: 200 diff --git a/Modules/Bar/Bar.qml b/Modules/Bar/Bar.qml index 09bf572..dad682e 100644 --- a/Modules/Bar/Bar.qml +++ b/Modules/Bar/Bar.qml @@ -97,7 +97,6 @@ Variants { anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: Style.marginM * root.scaling - width: parent.width Repeater { model: Settings.data.bar.widgets.left @@ -121,7 +120,6 @@ Variants { spacing: Style.marginS * root.scaling anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter - width: parent.width Repeater { model: Settings.data.bar.widgets.center @@ -146,7 +144,6 @@ Variants { anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: Style.marginM * root.scaling - width: parent.width Repeater { model: Settings.data.bar.widgets.right diff --git a/Widgets/NIconButton.qml b/Widgets/NIconButton.qml index 40417e6..07f2798 100644 --- a/Widgets/NIconButton.qml +++ b/Widgets/NIconButton.qml @@ -9,7 +9,6 @@ Rectangle { // Multiplier to control how large the button container is relative to Style.baseWidgetSize property real sizeRatio: 1.0 - readonly property real size: Style.baseWidgetSize * sizeRatio * scaling property string icon property string tooltipText @@ -30,8 +29,8 @@ Rectangle { signal rightClicked signal middleClicked - implicitWidth: Style.baseWidgetSize * scaling * sizeRatio - implicitHeight: Style.baseWidgetSize * scaling * sizeRatio + implicitWidth: Math.round(Style.baseWidgetSize * scaling * sizeRatio) + implicitHeight: Math.round(Style.baseWidgetSize * scaling * sizeRatio) opacity: root.enabled ? Style.opacityFull : Style.opacityMedium color: root.enabled && root.hovering ? colorBgHover : colorBg