repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

notifications: make group collapse an obvious button

bad3ad679ac7a7dd72a3b1cc354b9d52e46dd925

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

The per-app group header was a bare row with a faint chevron and no hover
feedback, so it didn't read as interactive. Render it as a pill with a
hover background and an explicit "Show N more" / "Show less" label beside
the chevron, so the collapse affordance is discoverable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Changed files (1)

quickshell/nuguland/PopoutHost.qml

Modified
1342 1342 width: root.width
1343 1343 spacing: 6
1345 - Item {
1345 + // collapsible group header: an obvious interactive pill with a
1346 + // hover background and an explicit "Show N more" / "Show less"
1347 + // label so the collapse affordance reads as a button, not decor.
1348 + Rectangle {
1349 + id: groupHeader
1346 1350 width: parent.width
1347 - height: (groupDelegate.modelData.count || 0) > 1 ? 22 : 0
1351 + height: (groupDelegate.modelData.count || 0) > 1 ? 26 : 0
1348 1352 visible: (groupDelegate.modelData.count || 0) > 1
1353 + radius: 8
1354 + color: grpArea.containsMouse && root.theme ? root.theme.withAlpha(root.theme.ui.minor, 0.16) : "transparent"
1355 + Behavior on color { ColorAnimation { duration: root.theme && root.theme.lowPowerMode ? 0 : 120 } }
1350 1357 anchors.left: parent.left
1358 + anchors.leftMargin: 8
1351 1359 anchors.verticalCenter: parent.verticalCenter
1352 1360 spacing: 6
1353 1361 NuguText { theme: root.theme; variant: "meta"; text: groupDelegate.modelData.appName || "" }
1354 1362 NuguText { theme: root.theme; variant: "meta"; text: `· ${groupDelegate.modelData.count}` }
1356 - NuguText {
1364 + Row {
1357 1365 anchors.right: parent.right
1366 + anchors.rightMargin: 8
1358 1367 anchors.verticalCenter: parent.verticalCenter
1359 - theme: root.theme
1360 - variant: "mono"
1361 - text: groupDelegate.modelData.expanded ? "⌃" : "⌄"
1368 + spacing: 4
1369 + NuguText {
1370 + theme: root.theme
1371 + variant: "meta"
1372 + opacity: grpArea.containsMouse ? 1 : 0.7
1373 + text: groupDelegate.modelData.expanded ? "Show less" : `Show ${Math.max(1, (groupDelegate.modelData.count || 1) - (groupDelegate.modelData.previewCount || 1))} more`
1375 + NuguText {
1376 + theme: root.theme
1377 + variant: "mono"
1378 + opacity: grpArea.containsMouse ? 1 : 0.7
1379 + text: groupDelegate.modelData.expanded ? "⌃" : "⌄"
1363 - MouseArea { anchors.fill: parent; onClicked: root.toggleGroup(groupDelegate.modelData.appName || "") }
1382 + MouseArea { id: grpArea; anchors.fill: parent; hoverEnabled: true; onClicked: root.toggleGroup(groupDelegate.modelData.appName || "") }
1366 1385 Repeater {