BarHeight: more rounding uniformization

This commit is contained in:
LemmyCook 2025-08-31 10:36:40 -04:00
parent fdf67ab512
commit fcf627c30b
5 changed files with 6 additions and 6 deletions

View file

@ -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 {

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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