More spacing fixes
This commit is contained in:
parent
de72236fe5
commit
9dfac69e9e
6 changed files with 14 additions and 27 deletions
|
|
@ -92,10 +92,10 @@ Variants {
|
||||||
|
|
||||||
// Top section (left widgets)
|
// Top section (left widgets)
|
||||||
Column {
|
Column {
|
||||||
spacing: Style.marginS * root.scaling
|
spacing: Style.marginXS * root.scaling
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: Style.marginM * root.scaling
|
anchors.topMargin: Style.marginS * root.scaling
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
|
|
@ -117,7 +117,7 @@ Variants {
|
||||||
|
|
||||||
// Center section (center widgets)
|
// Center section (center widgets)
|
||||||
Column {
|
Column {
|
||||||
spacing: Style.marginS * root.scaling
|
spacing: Style.marginXS * root.scaling
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
@ -141,10 +141,10 @@ Variants {
|
||||||
|
|
||||||
// Bottom section (right widgets)
|
// Bottom section (right widgets)
|
||||||
Column {
|
Column {
|
||||||
spacing: Style.marginS * root.scaling
|
spacing: Style.marginXS * root.scaling
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.bottomMargin: Style.marginM * root.scaling
|
anchors.bottomMargin: Style.marginS * root.scaling
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ Item {
|
||||||
property int sectionWidgetIndex: -1
|
property int sectionWidgetIndex: -1
|
||||||
property int sectionWidgetsCount: 0
|
property int sectionWidgetsCount: 0
|
||||||
|
|
||||||
|
|
||||||
property var widgetMetadata: BarWidgetRegistry.widgetMetadata[widgetId]
|
property var widgetMetadata: BarWidgetRegistry.widgetMetadata[widgetId]
|
||||||
property var widgetSettings: {
|
property var widgetSettings: {
|
||||||
if (section && sectionWidgetIndex >= 0) {
|
if (section && sectionWidgetIndex >= 0) {
|
||||||
|
|
@ -53,18 +52,8 @@ Item {
|
||||||
visible: getTitle() !== ""
|
visible: getTitle() !== ""
|
||||||
|
|
||||||
function calculatedVerticalHeight() {
|
function calculatedVerticalHeight() {
|
||||||
// Base height for the background rectangle
|
// Use standard widget height like other widgets
|
||||||
let total = Math.round(Style.capsuleHeight * scaling)
|
return 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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function calculatedHorizontalWidth() {
|
function calculatedHorizontalWidth() {
|
||||||
|
|
@ -222,8 +211,8 @@ Item {
|
||||||
Item {
|
Item {
|
||||||
id: verticalLayout
|
id: verticalLayout
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
width: parent.width - Style.marginM * scaling * 2
|
width: parent.width - Style.marginXS * scaling * 2
|
||||||
height: parent.height - Style.marginM * scaling * 2
|
height: parent.height - Style.marginXS * scaling * 2
|
||||||
visible: barPosition === "left" || barPosition === "right"
|
visible: barPosition === "left" || barPosition === "right"
|
||||||
|
|
||||||
// Window icon
|
// Window icon
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ Item {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
readonly property string barPosition: Settings.data.bar.position
|
readonly property string barPosition: Settings.data.bar.position
|
||||||
|
|
||||||
readonly property bool showAlbumArt: (widgetSettings.showAlbumArt !== undefined) ? widgetSettings.showAlbumArt : widgetMetadata.showAlbumArt
|
readonly property bool showAlbumArt: (widgetSettings.showAlbumArt !== undefined) ? widgetSettings.showAlbumArt : widgetMetadata.showAlbumArt
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ Item {
|
||||||
|
|
||||||
total = visibleCount * Math.round(Style.capsuleHeight * scaling)
|
total = visibleCount * Math.round(Style.capsuleHeight * scaling)
|
||||||
total += Math.max(visibleCount - 1, 0) * Style.marginXS * 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
|
return total
|
||||||
}
|
}
|
||||||
|
|
@ -329,7 +329,7 @@ Item {
|
||||||
id: verticalLayout
|
id: verticalLayout
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
width: Math.round(32 * scaling)
|
width: Math.round(32 * scaling)
|
||||||
height: parent.height - Style.marginM * scaling * 2
|
height: parent.height - Style.marginXS * scaling * 2
|
||||||
spacing: Style.marginXS * scaling
|
spacing: Style.marginXS * scaling
|
||||||
visible: barPosition === "left" || barPosition === "right"
|
visible: barPosition === "left" || barPosition === "right"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ Item {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
readonly property string barPosition: Settings.data.bar.position
|
readonly property string barPosition: Settings.data.bar.position
|
||||||
|
|
||||||
readonly property string labelMode: (widgetSettings.labelMode !== undefined) ? widgetSettings.labelMode : widgetMetadata.labelMode
|
readonly property string labelMode: (widgetSettings.labelMode !== undefined) ? widgetSettings.labelMode : widgetMetadata.labelMode
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue