CompositorService: use idx for niri workspaces

This commit is contained in:
Ly-sec 2025-09-11 14:31:36 +02:00
parent baafe54d13
commit a029463527
3 changed files with 4 additions and 4 deletions

View file

@ -41,14 +41,14 @@ Rectangle {
implicitHeight: compactMode ? (timeText.implicitHeight + dateText.implicitHeight + Math.round( implicitHeight: compactMode ? (timeText.implicitHeight + dateText.implicitHeight + Math.round(
Style.marginXS * scaling) + Math.round(Style.marginM * 2 * scaling)) : Math.round( Style.marginXS * scaling) + Math.round(Style.marginM * 2 * scaling)) : Math.round(
Style.capsuleHeight * scaling) Style.capsuleHeight * scaling)
radius: Math.round(Style.radiusM * scaling) radius: Math.round(implicitHeight / 2)
color: Color.mSurfaceVariant color: Color.mSurfaceVariant
// Clock with optional compact layout & attached calendar // Clock with optional compact layout & attached calendar
Item { Item {
id: clockContainer id: clockContainer
anchors.fill: parent anchors.fill: parent
anchors.margins: Math.round((compactMode ? Style.marginXS : Style.marginM) * scaling) anchors.margins: 0
Column { Column {
id: compactColumn id: compactColumn

View file

@ -37,7 +37,7 @@ ColumnLayout {
} }
NToggle { NToggle {
label: "Compact clock (date under time)" label: "Compact Mode"
checked: valueCompactMode checked: valueCompactMode
onToggled: checked => valueCompactMode = checked onToggled: checked => valueCompactMode = checked
} }

View file

@ -281,7 +281,7 @@ Singleton {
if (a.output !== b.output) { if (a.output !== b.output) {
return a.output.localeCompare(b.output) return a.output.localeCompare(b.output)
} }
return a.id - b.id return a.idx - b.idx
}) })
// Update the workspaces ListModel // Update the workspaces ListModel