Spacer: fix vertical spacing

This commit is contained in:
Ly-sec
2025-12-01 15:44:15 +01:00
parent e90def855e
commit 1a37da8ae8
+4 -5
View File
@@ -27,12 +27,11 @@ Item {
return {};
}
// Use settings or defaults from BarWidgetRegistry
readonly property int spacerWidth: widgetSettings.width !== undefined ? widgetSettings.width : widgetMetadata.width
readonly property bool isBarVertical: Settings.data.bar.position === "left" || Settings.data.bar.position === "right"
readonly property int spacerSize: widgetSettings.width !== undefined ? widgetSettings.width : widgetMetadata.width
// Set the width based on user settings
implicitWidth: spacerWidth
implicitHeight: Style.barHeight
implicitWidth: isBarVertical ? Style.barHeight : spacerSize
implicitHeight: isBarVertical ? spacerSize : Style.barHeight
width: implicitWidth
height: implicitHeight
}