Files
glassMxrph/quickshell/wallpaper/WallpaperBackground.qml
T
mxandClaude Opus 5.5 de9b863f3f Make the wallpaper picker a full-screen live preview
The screen previews the selected wallpaper with the real transition
(TransitionStage, now shared with the desktop background) under a
frosted sheet with a 16:9 thumbnail grid. Click or arrows preview,
double-click or Enter applies and switches the picker's output directly,
Space peeks, typing searches. Thumbnails mark outline wallpapers (wallfx
status).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 22:52:55 +01:00

39 lines
1.4 KiB
QML

pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Wayland
import "../services"
import "../theme"
// qmllint disable uncreatable-type
PanelWindow {
id:root
required property var modelData
screen:modelData
anchors {top:true;bottom:true;left:true;right:true}
color:Theme.surface
exclusionMode:ExclusionMode.Ignore
WlrLayershell.layer:WlrLayer.Background
WlrLayershell.namespace:"glassMxrph-wallpaper"
mask:Region {}
readonly property string targetPath:ConfigService.ready ? (ConfigService.data.wallpaper.byMonitor[root.modelData.name] || "") : ""
TransitionStage {
id:stage
anchors.fill:parent
// Every output starts its change together (WallpaperService.revealSerial).
waitForGo:true
onLoading:WallpaperService.revealLoading(root.modelData.name)
onReady:WallpaperService.revealReady(root.modelData.name)
}
// The picker's live preview already shows the wallpaper it applies on its
// own output, so that output switches directly underneath it.
onTargetPathChanged:{
stage.instantNext=WallpaperService.instant[root.modelData.name]===targetPath;
stage.path=targetPath;
}
Component.onCompleted:stage.path=targetPath
Connections {
target:WallpaperService
function onRevealSerialChanged() {stage.go();}
}
}