From e63d210358033d19327ca50fe0ca7bea762b2bbb Mon Sep 17 00:00:00 2001 From: bbedward Date: Tue, 21 Jul 2026 11:27:49 -0400 Subject: [PATCH] wallpaper: use filter chips for random transitions --- dank-qml-common | 2 +- flake.lock | 6 +++--- quickshell/Modules/Settings/WallpaperTab.qml | 16 +++++++++------- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/dank-qml-common b/dank-qml-common index 1451ac603..1919595f0 160000 --- a/dank-qml-common +++ b/dank-qml-common @@ -1 +1 @@ -Subproject commit 1451ac603844f2b686e58fa062b1456373693c22 +Subproject commit 1919595f0dde4f5bf5ac0baa1902ff6d070971d5 diff --git a/flake.lock b/flake.lock index 5c0515584..8d0707d76 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "dank-qml-common": { "flake": false, "locked": { - "lastModified": 1784591373, - "narHash": "sha256-oChgAprzgLrpMXDI/AyVt1lJ+S9ayErRZw+1j9d8Sbg=", + "lastModified": 1784647395, + "narHash": "sha256-kcLSJC8XBzmWoSBc90Zn81qrNsqWMkwQ1m/zZixOw30=", "owner": "AvengeMedia", "repo": "dank-qml-common", - "rev": "1451ac603844f2b686e58fa062b1456373693c22", + "rev": "1919595f0dde4f5bf5ac0baa1902ff6d070971d5", "type": "github" }, "original": { diff --git a/quickshell/Modules/Settings/WallpaperTab.qml b/quickshell/Modules/Settings/WallpaperTab.qml index 2ca0ae516..5fb5271cb 100644 --- a/quickshell/Modules/Settings/WallpaperTab.qml +++ b/quickshell/Modules/Settings/WallpaperTab.qml @@ -1198,16 +1198,18 @@ Item { width: parent.width - Theme.spacingM * 2 } - DankButtonGroup { + DankFilterChips { id: transitionGroup width: parent.width - Theme.spacingM * 2 - selectionMode: "multi" - model: SessionData.availableWallpaperTransitions.filter(t => t !== "none") - initialSelection: SessionData.includedTransitions - currentSelection: SessionData.includedTransitions + multiSelect: true + model: SessionData.availableWallpaperTransitions.filter(t => t !== "none").map(t => ({ + "value": t, + "label": t.replace(/\b\w/g, c => c.toUpperCase()) + })) + selectedValues: SessionData.includedTransitions - onSelectionChanged: (index, selected) => { - const transition = model[index]; + onSelectionToggled: (index, selected) => { + const transition = model[index].value; let newIncluded = SessionData.includedTransitions.slice(); if (selected && !newIncluded.includes(transition)) {