Scroll the wallpaper picker with the mouse wheel

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mxandClaude Opus 5.5 committed 2026-10-13 15:53:47 +02:00
1 parent 1a2aba82b0
commit addf49800a
1 file changed
+12
+12
View File
@@ -91,6 +91,18 @@ PanelWindow {
Keys.onReturnPressed:root.applyCurrent()
Keys.onEnterPressed:root.applyCurrent()
Keys.onEscapePressed:ShellState.wallpaperPickerOpen=false
// A vertical mouse wheel steps through the horizontal strip, one tile per notch.
WheelHandler {
property real pending:0
acceptedDevices:PointerDevice.Mouse
onWheel:event=>{
pending+=event.angleDelta.y || event.angleDelta.x;
const steps=Math.trunc(pending/120);
if(!steps)return;
pending-=steps*120;
view.currentIndex=Math.max(0,Math.min(view.count-1,view.currentIndex-steps));
}
}
delegate:GlassPanel {
id:tile
required property var modelData