From fcf627c30b814783d6ac7ffd55db8eca9595cd88 Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Sun, 31 Aug 2025 10:36:40 -0400 Subject: [PATCH] BarHeight: more rounding uniformization --- Modules/Bar/Widgets/Tray.qml | 2 +- Modules/Launcher/Launcher.qml | 2 +- Modules/SettingsPanel/Tabs/AboutTab.qml | 2 +- Modules/WiFiPanel/WiFiPanel.qml | 4 ++-- Widgets/NPanel.qml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Modules/Bar/Widgets/Tray.qml b/Modules/Bar/Widgets/Tray.qml index 4160d98..d960f45 100644 --- a/Modules/Bar/Widgets/Tray.qml +++ b/Modules/Bar/Widgets/Tray.qml @@ -104,7 +104,7 @@ Rectangle { // Anchor the menu to the tray icon item (parent) and position it below the icon const menuX = (width / 2) - (trayMenu.item.width / 2) - const menuY = (Style.barHeight * scaling) + const menuY = Math.round(Style.barHeight * scaling) trayMenu.item.menu = modelData.menu trayMenu.item.showAt(parent, menuX, menuY) } else { diff --git a/Modules/Launcher/Launcher.qml b/Modules/Launcher/Launcher.qml index 2ac193a..d2c5553 100644 --- a/Modules/Launcher/Launcher.qml +++ b/Modules/Launcher/Launcher.qml @@ -244,7 +244,7 @@ NPanel { // Search bar Rectangle { Layout.fillWidth: true - Layout.preferredHeight: Style.barHeight * scaling + Layout.preferredHeight: Math.round(Style.barHeight * scaling) Layout.bottomMargin: Style.marginM * scaling radius: Style.radiusM * scaling color: Color.mSurface diff --git a/Modules/SettingsPanel/Tabs/AboutTab.qml b/Modules/SettingsPanel/Tabs/AboutTab.qml index 21c55b2..52ed90c 100644 --- a/Modules/SettingsPanel/Tabs/AboutTab.qml +++ b/Modules/SettingsPanel/Tabs/AboutTab.qml @@ -81,7 +81,7 @@ ColumnLayout { Layout.alignment: Qt.AlignCenter Layout.topMargin: Style.marginS * scaling Layout.preferredWidth: updateText.implicitWidth + 46 * scaling - Layout.preferredHeight: Style.barHeight * scaling + Layout.preferredHeight: Math.round(Style.barHeight * scaling) radius: Style.radiusL * scaling color: updateArea.containsMouse ? Color.mPrimary : Color.transparent border.color: Color.mPrimary diff --git a/Modules/WiFiPanel/WiFiPanel.qml b/Modules/WiFiPanel/WiFiPanel.qml index 4349cc4..80323de 100644 --- a/Modules/WiFiPanel/WiFiPanel.qml +++ b/Modules/WiFiPanel/WiFiPanel.qml @@ -271,7 +271,7 @@ NPanel { Item { Layout.fillWidth: true - Layout.preferredHeight: Style.barHeight * scaling + Layout.preferredHeight: Math.round(Style.barHeight * scaling) Rectangle { anchors.fill: parent @@ -313,7 +313,7 @@ NPanel { Rectangle { Layout.preferredWidth: Style.baseWidgetSize * 2.5 * scaling - Layout.preferredHeight: Style.barHeight * scaling + Layout.preferredHeight: Math.round(Style.barHeight * scaling) radius: Style.radiusM * scaling color: Color.mPrimary diff --git a/Widgets/NPanel.qml b/Widgets/NPanel.qml index 2bfc771..e65a1b0 100644 --- a/Widgets/NPanel.qml +++ b/Widgets/NPanel.qml @@ -38,7 +38,7 @@ Loader { property real opacityValue: originalOpacity property alias isClosing: hideTimer.running - readonly property real barHeight: Style.barHeight * scaling + readonly property real barHeight: Math.round(Style.barHeight * scaling) readonly property bool barAtBottom: Settings.data.bar.position === "bottom" signal opened