Workspace: proper spacing when no label bubble

This commit is contained in:
Lemmy
2026-01-09 16:14:45 -05:00
parent 0f20adaa12
commit 8ad19e0a4f
+5 -4
View File
@@ -39,6 +39,7 @@ Item {
readonly property real baseDimensionRatio: 0.65 * (widgetSettings.labelMode === "none" ? 0.75 : 1)
readonly property string labelMode: (widgetSettings.labelMode !== undefined) ? widgetSettings.labelMode : widgetMetadata.labelMode
readonly property bool hasLabel: (labelMode !== "none")
readonly property bool hideUnoccupied: (widgetSettings.hideUnoccupied !== undefined) ? widgetSettings.hideUnoccupied : widgetMetadata.hideUnoccupied
readonly property bool followFocusedScreen: (widgetSettings.followFocusedScreen !== undefined) ? widgetSettings.followFocusedScreen : widgetMetadata.followFocusedScreen
readonly property int characterCount: isVertical ? 2 : ((widgetSettings.characterCount !== undefined) ? widgetSettings.characterCount : widgetMetadata.characterCount)
@@ -100,8 +101,8 @@ Item {
signal workspaceChanged(int workspaceId, color accentColor)
implicitWidth: showApplications ? (isVertical ? groupedGrid.implicitWidth : Math.round(groupedGrid.implicitWidth + horizontalPadding)) : (isVertical ? Style.barHeight : computeWidth())
implicitHeight: showApplications ? (isVertical ? Math.round(groupedGrid.implicitHeight + horizontalPadding * 0.6) : Style.barHeight) : (isVertical ? computeHeight() : Style.barHeight)
implicitWidth: showApplications ? (isVertical ? groupedGrid.implicitWidth : Math.round(groupedGrid.implicitWidth + horizontalPadding * hasLabel)) : (isVertical ? Style.barHeight : computeWidth())
implicitHeight: showApplications ? (isVertical ? Math.round(groupedGrid.implicitHeight + horizontalPadding * 0.6 * hasLabel) : Style.barHeight) : (isVertical ? computeHeight() : Style.barHeight)
function getWorkspaceWidth(ws) {
const d = Math.round(Style.capsuleHeight * root.baseDimensionRatio);
@@ -1033,8 +1034,8 @@ Item {
id: groupedGrid
visible: showApplications
x: root.isVertical ? Style.pixelAlignCenter(parent.width, width) : Math.round(horizontalPadding)
y: root.isVertical ? Math.round(horizontalPadding * 0.4) : Style.pixelAlignCenter(parent.height, height)
x: root.isVertical ? Style.pixelAlignCenter(parent.width, width) : Math.round(horizontalPadding * root.hasLabel)
y: root.isVertical ? Math.round(horizontalPadding * 0.4 * root.hasLabel) : Style.pixelAlignCenter(parent.height, height)
spacing: Style.marginS
flow: root.isVertical ? Flow.TopToBottom : Flow.LeftToRight