Optional capsule bg

This commit is contained in:
LemmyCook 2025-09-16 09:23:37 -04:00
parent 071100459f
commit 95d2dbe3fc
13 changed files with 26 additions and 17 deletions

View file

@ -61,12 +61,11 @@ Item {
implicitWidth: isVertical ? Math.round(Style.barHeight * scaling) : computeWidth()
implicitHeight: isVertical ? computeHeight() : Math.round(Style.barHeight * scaling)
function getWorkspaceWidth(ws) {
const d = Style.capsuleHeight * root.baseDimensionRatio
if (ws.isFocused)
return d * 2.5
else
else
return d
}
@ -74,7 +73,7 @@ Item {
const d = Style.capsuleHeight * root.baseDimensionRatio
if (ws.isFocused)
return d * 3
else
else
return d
}
@ -184,7 +183,7 @@ Item {
width: isVertical ? Math.round(Style.capsuleHeight * scaling) : parent.width
height: isVertical ? parent.height : Math.round(Style.capsuleHeight * scaling)
radius: Math.round(Style.radiusM * scaling)
color: compact ? Color.transparent : Color.mSurfaceVariant
color: Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
@ -205,7 +204,7 @@ Item {
id: workspacePillContainer
width: root.getWorkspaceWidth(model)
height: Style.capsuleHeight * root.baseDimensionRatio
Rectangle {
id: pill
anchors.fill: parent