More spacing fixes

This commit is contained in:
Ly-sec 2025-09-13 19:28:44 +02:00
parent de72236fe5
commit 9dfac69e9e
6 changed files with 14 additions and 27 deletions

View file

@ -92,10 +92,10 @@ Variants {
// Top section (left widgets)
Column {
spacing: Style.marginS * root.scaling
spacing: Style.marginXS * root.scaling
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: Style.marginM * root.scaling
anchors.topMargin: Style.marginS * root.scaling
width: parent.width
Repeater {
@ -117,7 +117,7 @@ Variants {
// Center section (center widgets)
Column {
spacing: Style.marginS * root.scaling
spacing: Style.marginXS * root.scaling
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
width: parent.width
@ -141,10 +141,10 @@ Variants {
// Bottom section (right widgets)
Column {
spacing: Style.marginS * root.scaling
spacing: Style.marginXS * root.scaling
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.bottomMargin: Style.marginM * root.scaling
anchors.bottomMargin: Style.marginS * root.scaling
width: parent.width
Repeater {

View file

@ -19,7 +19,6 @@ Item {
property int sectionWidgetIndex: -1
property int sectionWidgetsCount: 0
property var widgetMetadata: BarWidgetRegistry.widgetMetadata[widgetId]
property var widgetSettings: {
if (section && sectionWidgetIndex >= 0) {
@ -53,18 +52,8 @@ Item {
visible: getTitle() !== ""
function calculatedVerticalHeight() {
// Base height for the background rectangle
let total = Math.round(Style.capsuleHeight * scaling)
// Add padding for the container margins
total += Style.marginM * scaling * 2 // Top and bottom margins
// Add space for icon if shown
if (showIcon) {
total += Style.fontSizeL * scaling * 1.2 + Style.marginS * scaling
}
return total
// Use standard widget height like other widgets
return Math.round(Style.capsuleHeight * scaling)
}
function calculatedHorizontalWidth() {
@ -222,8 +211,8 @@ Item {
Item {
id: verticalLayout
anchors.centerIn: parent
width: parent.width - Style.marginM * scaling * 2
height: parent.height - Style.marginM * scaling * 2
width: parent.width - Style.marginXS * scaling * 2
height: parent.height - Style.marginXS * scaling * 2
visible: barPosition === "left" || barPosition === "right"
// Window icon

View file

@ -30,7 +30,6 @@ Item {
return {}
}
readonly property string barPosition: Settings.data.bar.position
readonly property bool showAlbumArt: (widgetSettings.showAlbumArt !== undefined) ? widgetSettings.showAlbumArt : widgetMetadata.showAlbumArt

View file

@ -57,7 +57,7 @@ Item {
total = visibleCount * Math.round(Style.capsuleHeight * scaling)
total += Math.max(visibleCount - 1, 0) * Style.marginXS * scaling
total += Style.marginM * scaling * 2 // padding
total += Style.marginXS * scaling * 2 // minimal padding to match other widgets
return total
}
@ -329,7 +329,7 @@ Item {
id: verticalLayout
anchors.centerIn: parent
width: Math.round(32 * scaling)
height: parent.height - Style.marginM * scaling * 2
height: parent.height - Style.marginXS * scaling * 2
spacing: Style.marginXS * scaling
visible: barPosition === "left" || barPosition === "right"

View file

@ -31,7 +31,6 @@ Item {
return {}
}
readonly property string barPosition: Settings.data.bar.position
readonly property string labelMode: (widgetSettings.labelMode !== undefined) ? widgetSettings.labelMode : widgetMetadata.labelMode