diff --git a/docs/customization.md b/docs/customization.md index dd5f8de..7c4154a 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -16,7 +16,7 @@ Open Settings → Wallpaper → Open wallpaper picker, or run: ./scripts/glassmxrph wallpaper ``` -The picker covers the screen with a live preview of the selected wallpaper and a grid of thumbnails on a frosted sheet. Selecting a wallpaper (click or arrow keys) plays the real transition to it in the preview; Enter or double-click applies it, and the desktop under the preview switches directly while other outputs play the transition. Space hides the sheet to look at the preview alone, typing searches, and Escape closes without changing anything. ✦ marks wallpapers whose subject outline is drawn first. History records the last 50 selections. +The picker drawer shows the wallpapers as a justified gallery: every thumbnail keeps its own aspect ratio and each row fills the width. Search local images, select an output, browse with the arrow keys and apply with Enter or a click. ✦ marks wallpapers whose subject outline is drawn first when changing to them. History records the last 50 selections. Escape or an outside click closes it. Configure image directories in Wallpaper settings; the default search directory is ~/Pictures/Wallpapers. Select the Native backend when replacing Serpantinum. New configurations default to Native; existing explicit backend preferences are preserved. diff --git a/quickshell/helpers/desktop.py b/quickshell/helpers/desktop.py index 2160dbb..61fca69 100644 --- a/quickshell/helpers/desktop.py +++ b/quickshell/helpers/desktop.py @@ -92,6 +92,41 @@ def apply(req): else:raise ValueError('No active wallpaper provider') return {'backend':backend,'path':str(path),'providerPath':str(path)} +def image_size(path): + """(width, height) from the file header, or None. Standard library only: + the picker lays thumbnails out by aspect ratio before any is decoded.""" + import struct + try: + with open(path,'rb') as f: + head=f.read(32) + if head[:8]==b'\x89PNG\r\n\x1a\n': + return struct.unpack('>II',head[16:24]) + if head[:2]==b'BM': + w,h=struct.unpack('>6))) + if kind==b'VP8X': + return (1+int.from_bytes(head[24:27],'little'),1+int.from_bytes(head[27:30],'little')) + return None + if head[:2]==b'\xff\xd8': + f.seek(2) + while True: + marker=f.read(2) + if len(marker)<2 or marker[0]!=0xff:return None + while marker[1]==0xff:marker=marker[:1]+f.read(1) + if marker[1] in (0xd8,0x01) or 0xd0<=marker[1]<=0xd7:continue + length=struct.unpack('>H',f.read(2))[0] + if marker[1] in (0xc0,0xc1,0xc2,0xc3,0xc5,0xc6,0xc7,0xc9,0xca,0xcb,0xcd,0xce,0xcf): + h,w=struct.unpack('>xHH',f.read(5));return (w,h) + f.seek(length-2,1) + except (OSError,struct.error): + return None + return None + def scan(req): found={};errors=[] for directory in (req.get('directories') or [str(Path.home()/'Pictures/Wallpapers')]): @@ -99,7 +134,8 @@ def scan(req): try: for entry in base.iterdir(): if entry.is_file() and entry.suffix.lower() in IMAGES: - resolved=entry.resolve();found[str(resolved)]={'path':str(resolved),'url':resolved.as_uri(),'name':entry.name} + resolved=entry.resolve();size=image_size(resolved) + found[str(resolved)]={'path':str(resolved),'url':resolved.as_uri(),'name':entry.name,'width':size[0] if size else 0,'height':size[1] if size else 0} if len(found)>=1000:break except OSError as error:errors.append(str(error)) if len(found)>=1000:break diff --git a/quickshell/services/WallpaperService.qml b/quickshell/services/WallpaperService.qml index 7413708..566c453 100644 --- a/quickshell/services/WallpaperService.qml +++ b/quickshell/services/WallpaperService.qml @@ -48,18 +48,11 @@ Singleton { next[output] = path; observed = next; } - // Output -> path that switches without a change, because the picker's live - // preview already shows it there (see WallpaperBackground). - property var instant: ({}) - function apply(path, instantOutput) { + function apply(path) { const outputs = selectedMonitor === "all" ? Quickshell.screens.map(s => s.name) : [monitor]; if (!ConfigService.ready || !ConfigService.writable || !outputs.length || !outputs[0] || busy) return false; error = ""; - const nextInstant = {}; - if (instantOutput) - nextInstant[instantOutput] = path; - instant = nextInstant; prepareTransition(path); // Native rendering needs no provider round trip: decode once, then switch // every output in one write so their transitions start together. diff --git a/quickshell/testing/SettingsDriver.qml b/quickshell/testing/SettingsDriver.qml index 10b5180..d0aece4 100644 --- a/quickshell/testing/SettingsDriver.qml +++ b/quickshell/testing/SettingsDriver.qml @@ -116,11 +116,9 @@ Item { } function pickerQuery(text: string): void {input.findChild(ShellState.wallpaperWindow.contentItem,"wallpaperSearch").text=text;} function pickerSelect(index: int): bool { - const view=input.findChild(ShellState.wallpaperWindow.contentItem,"wallpaperGrid"); - view.positionViewAtIndex(index,GridView.Contain);input.wait(50); - const item=view.itemAtIndex(index);if(!item)return false; - // Click previews; double-click applies. - input.mouseDoubleClickSequence(item,item.width/2,item.height/2);return true; + ShellState.wallpaperWindow.tileAt(index);input.wait(50); + const item=ShellState.wallpaperWindow.tileAt(index);if(!item)return false; + input.mouseClick(item,item.width/2,item.height/2);return true; } function pickerScreenshot(path: string): bool {return input.findChild(ShellState.wallpaperWindow.contentItem,"wallpaperPickerSurface").grabToImage(result=>result.saveToFile(path));} function geometry(name: string): string { diff --git a/quickshell/wallpaper/TransitionStage.qml b/quickshell/wallpaper/TransitionStage.qml index 70a933d..fcf4dc1 100644 --- a/quickshell/wallpaper/TransitionStage.qml +++ b/quickshell/wallpaper/TransitionStage.qml @@ -4,7 +4,7 @@ import "../services" import "../theme" // A full-size wallpaper that changes with shaders/transition.frag: colonies, or // the new wallpaper's subject outline when helpers/wallfx.py has its maps. -// The desktop background and the picker's live preview both draw with it. +// One per output (WallpaperBackground). Item { id: root // The wallpaper to show. Changing it starts a change once the new image @@ -13,8 +13,6 @@ Item { // false: a change starts as soon as it is ready. true: it emits ready() // and waits for go(), so several outputs can start together. property bool waitForGo: false - // Show the next path directly, without a change (consumed by that change). - property bool instantNext: false signal loading() signal ready() // 0..1 while the new wallpaper takes over. @@ -25,8 +23,7 @@ Item { // The first wallpaper (and reduced motion) appears directly; later changes // load into `incoming` and are revealed once decoded. onTargetChanged: { - if (!shown.source.toString() || Theme.duration === 0 || instantNext) { - instantNext = false; + if (!shown.source.toString() || Theme.duration === 0) { reveal.stop(); progress = 0; incoming.source = ""; shown.source = target; return; } diff --git a/quickshell/wallpaper/WallpaperBackground.qml b/quickshell/wallpaper/WallpaperBackground.qml index b8d4695..6de11b0 100644 --- a/quickshell/wallpaper/WallpaperBackground.qml +++ b/quickshell/wallpaper/WallpaperBackground.qml @@ -24,12 +24,7 @@ PanelWindow { 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; - } + onTargetPathChanged:stage.path=targetPath Component.onCompleted:stage.path=targetPath Connections { target:WallpaperService diff --git a/quickshell/wallpaper/WallpaperPicker.qml b/quickshell/wallpaper/WallpaperPicker.qml index adf90c8..4e26808 100644 --- a/quickshell/wallpaper/WallpaperPicker.qml +++ b/quickshell/wallpaper/WallpaperPicker.qml @@ -10,290 +10,233 @@ import "../services" import "../core" import "../theme" // qmllint disable uncreatable-type -// Full-screen wallpaper picker. The whole screen is a live preview: moving the -// selection plays the real change (TransitionStage) to that wallpaper, and the -// grid sits on a frosted sheet over it. Enter applies (the desktop under the -// preview switches directly, see WallpaperBackground), Esc leaves everything as -// it was, Space hides the sheet to look at the preview alone. PanelWindow { id:root screen:ScreenService.current(ShellState.wallpaperScreen) - anchors {top:true;bottom:true;left:true;right:true} - readonly property string screenName:screen ? screen.name : "" - readonly property bool open:ShellState.wallpaperPickerOpen - visible:open || content.opacity>0 + // Hangs from the middle of the bar as a drawer; the layer starts at the + // screen top so the bar join is inside its box. + anchors {top:true} + readonly property real screenWidth:screen ? screen.width : 1920 + readonly property real screenHeight:screen ? screen.height : 1080 + implicitWidth:Math.round(surface.width) + implicitHeight:Math.round(BarDrawers.bottom+surface.contentHeight) + visible:ShellState.wallpaperPickerOpen || surface.shown color:Theme.transparent exclusionMode:ExclusionMode.Ignore WlrLayershell.namespace:"glassMxrph-wallpaper-picker" WlrLayershell.layer:WlrLayer.Overlay - WlrLayershell.keyboardFocus:open ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None + WlrLayershell.keyboardFocus:ShellState.wallpaperPickerOpen ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None Component.onCompleted:ShellState.wallpaperWindow=root Component.onDestruction:ShellState.wallpaperWindow=null - property string filter:"all" readonly property var results:WallpaperService.images.filter(i=>(filter!=="history" || ConfigService.data.wallpaper.history.includes(i.path)) && (!search.text || i.name.toLowerCase().includes(search.text.toLowerCase()))) - // The selection lives here, not in the view: a rescan or a new search - // replaces the model, and the view would fall back to the first tile. - property string selectedPath:"" - readonly property var selected:results.find(i=>i.path===selectedPath) || null - property bool peek:false - property string applying:"" - readonly property string desktopPath:ConfigService.ready ? (ConfigService.data.wallpaper.byMonitor[root.screenName] || WallpaperService.currentPath) : "" + // Justified rows, as in a photo gallery: every thumbnail keeps its own + // aspect ratio (from the scan's header sizes) and each row is scaled so it + // fills the width exactly. The last row keeps the target height. + readonly property real rowTarget:170 + readonly property real gap:10 + readonly property var rows:layoutRows(results,view.width) + function aspectOf(image) { + const a=image.width>0 && image.height>0 ? image.width/image.height : 16/9; + return Math.max(0.5,Math.min(3,a)); // keep panoramas and slivers usable + } + function layoutRows(images,width) { + const out=[]; + if(width<=0)return out; + let row=[],sum=0; + const close=height=>{ + let x=0; + out.push({height:height,tiles:row.map(t=>{const w=t.aspect*height;const tile={index:t.index,x:x,width:w};x+=w+root.gap;return tile;})}); + row=[];sum=0; + }; + images.forEach((image,index)=>{ + const aspect=aspectOf(image); + row.push({index:index,aspect:aspect});sum+=aspect; + if(sum*rowTarget+gap*(row.length-1)>=width)close((width-gap*(row.length-1))/sum); + }); + if(row.length)close(rowTarget); + return out; + } + // Where each result sits: its row, and its horizontal centre for up/down. + readonly property var places:{ + const p=[]; + rows.forEach((row,r)=>row.tiles.forEach(t=>p[t.index]={row:r,center:t.x+t.width/2})); + return p; + } + + property int current:0 + onResultsChanged:if(current>=results.length)current=Math.max(0,results.length-1) function select(index) { if(index<0 || index>=results.length)return; - view.currentIndex=index; - selectedPath=results[index].path; + current=index; + if(places[index])view.positionViewAtIndex(places[index].row,ListView.Contain); } - // Puts the view back on the selection after its model was replaced. The - // selection only changes on input (select/step), never from the view. - property bool centerOnSync:false - function syncSelection() { - const index=results.findIndex(i=>i.path===selectedPath); - view.currentIndex=index; - if(index>=0 && centerOnSync) {view.positionViewAtIndex(index,GridView.Center);centerOnSync=false;} + // Up/down: the tile in the next row whose centre is closest. + function vertical(direction) { + const here=places[current]; + if(!here)return select(0); + const row=rows[here.row+direction]; + if(!row)return; + let best=row.tiles[0]; + for(const t of row.tiles)if(Math.abs(t.x+t.width/2-here.center)view.forceActiveFocus()); + target:ShellState + function onWallpaperPickerOpenChanged() { + if(ShellState.wallpaperPickerOpen) { + WallpaperService.refresh();WallpaperService.scan(); + const at=root.results.findIndex(i=>i.path===WallpaperService.currentPath); + if(at>=0)root.select(at); + Qt.callLater(()=>view.forceActiveFocus()); + } } } - - Item { - id:content + // Exclusive focus routes outside clicks here (see ControlCenter). + MouseArea {x:-20000;y:-20000;width:40000;height:40000;onPressed:ShellState.wallpaperPickerOpen=false} + BarDrawer { + id:surface objectName:"wallpaperPickerSurface" - anchors.fill:parent - opacity:root.open ? 1 : 0 - Behavior on opacity {NumberAnimation {duration:Theme.duration*1.2;easing.type:Easing.OutCubic}} - // Release the preview's textures once fully closed. - onOpacityChanged:if(opacity===0 && !root.open)preview.path="" - - TransitionStage { - id:preview - anchors.fill:parent - } - MouseArea {anchors.fill:parent;onClicked:root.peek=!root.peek} - - // Name and transition of the selection, over the preview. + y:BarDrawers.bottom + open:ShellState.wallpaperPickerOpen + contentWidth:Math.min(1240,root.screenWidth-2*(BarDrawers.margin+BarDrawers.radius+ear)) + contentHeight:Math.min(640,root.screenHeight-BarDrawers.bottom-40) + drawerId:"wallpaper" + screenName:root.screen ? root.screen.name : "" + screenX:(root.screenWidth-width)/2 + MouseArea {anchors.fill:parent} ColumnLayout { - id:info - x:56;y:48 - spacing:6 - opacity:root.selected ? 1 : 0 - Behavior on opacity {NumberAnimation {duration:Theme.duration}} - layer.enabled:true - layer.effect:MultiEffect {shadowEnabled:true;shadowBlur:0.8;shadowOpacity:0.7;shadowColor:"black";autoPaddingEnabled:true} - Text { - text:root.selected ? root.selected.name.replace(/\.[^.]+$/,"") : "" - color:"white";font.pixelSize:34;font.weight:Font.DemiBold - } - Text { - readonly property string status:root.selected ? (WallpaperService.outlineStatus[root.selected.path] || "") : "" - text:(status==="outline" ? "✦ Outline transition" : status==="pending" ? "Preparing outline…" : "Colonies transition") - +" · "+(view.currentIndex+1)+" / "+root.results.length - +(root.selected && root.selected.path===root.desktopPath ? " · current" : "") - color:Qt.alpha("white",0.85);font.pixelSize:15 - } - } - - // Frosted sheet: a blurred copy of the preview behind it, so the glass - // shows the wallpaper being previewed (the compositor's blur would show - // what is under this window instead). - Item { - id:sheet - width:parent.width-96 - height:Math.min(540,Math.round(parent.height*0.46)) - x:48 - y:root.peek || !root.open ? parent.height+16 : parent.height-height-36 - Behavior on y {NumberAnimation {duration:Theme.duration*1.4;easing.type:Easing.OutCubic}} - ShaderEffectSource { - id:sheetBackdrop - sourceItem:preview - sourceRect:Qt.rect(sheet.x,sheet.y,sheet.width,sheet.height) - visible:false - } - Item { - id:sheetMask - anchors.fill:parent - visible:false - layer.enabled:true - Rectangle {anchors.fill:parent;radius:28} - } - MultiEffect { - anchors.fill:parent - source:sheetBackdrop - autoPaddingEnabled:false - blurEnabled:true;blur:1;blurMax:64 - saturation:-0.1;brightness:-0.08 - maskEnabled:true;maskSource:sheetMask - maskThresholdMin:0.5;maskSpreadAtMin:1 - } - Rectangle {anchors.fill:parent;radius:28;color:Qt.alpha(Theme.tint,0.38);border.width:1;border.color:Theme.border} - MouseArea {anchors.fill:parent} - - ColumnLayout { - anchors.fill:parent;anchors.margins:22;spacing:14 - RowLayout { - Layout.fillWidth:true;spacing:10 - Text {text:"Wallpapers";color:Theme.text;font.pixelSize:22} - GlassButton {text:"All";accented:root.filter==="all";onClicked:root.filter="all"} - GlassButton {text:"History";accented:root.filter==="history";onClicked:root.filter="history"} - GlassTextField { - id:search;objectName:"wallpaperSearch" - Layout.fillWidth:true;placeholderText:"Search wallpapers…" - Keys.onEscapePressed:root.close() - Keys.onDownPressed:view.forceActiveFocus() - Keys.onReturnPressed:view.forceActiveFocus() - } - GlassComboBox { - Layout.preferredWidth:150 - model:["all","primary"].concat(Quickshell.screens.map(s=>s.name)) - currentIndex:Math.max(0,model.indexOf(WallpaperService.selectedMonitor)) - onActivated:WallpaperService.selectedMonitor=currentText - } - GlassIconButton {text:"↻";onClicked:WallpaperService.scan();Accessible.name:"Refresh wallpapers"} - GlassIconButton {text:"⚙";onClicked:ShellState.openSettings("wallpaper");Accessible.name:"Wallpaper settings"} - GlassIconButton {text:"×";onClicked:root.close();Accessible.name:"Close picker"} + anchors.fill:parent;anchors.margins:22;spacing:16 + RowLayout { + Layout.fillWidth:true + Text {text:"Wallpapers";color:Theme.text;font.pixelSize:24;Layout.fillWidth:true} + GlassComboBox { + Layout.preferredWidth:160 + model:["all","primary"].concat(Quickshell.screens.map(s=>s.name)) + currentIndex:Math.max(0,model.indexOf(WallpaperService.selectedMonitor)) + onActivated:WallpaperService.selectedMonitor=currentText } - GridView { - id:view - objectName:"wallpaperGrid" - Layout.fillWidth:true;Layout.fillHeight:true - readonly property int columns:Math.max(3,Math.floor(width/300)) - cellWidth:Math.floor(width/columns) - cellHeight:Math.round((cellWidth-16)*9/16)+16 - clip:true - model:root.results - boundsBehavior:Flickable.StopAtBounds - keyNavigationEnabled:false - ScrollBar.vertical:ScrollBar {} - Keys.onLeftPressed:root.step(()=>view.moveCurrentIndexLeft()) - Keys.onRightPressed:root.step(()=>view.moveCurrentIndexRight()) - Keys.onUpPressed:root.step(()=>view.moveCurrentIndexUp()) - Keys.onDownPressed:root.step(()=>view.moveCurrentIndexDown()) - Keys.onReturnPressed:root.applySelected() - Keys.onEnterPressed:root.applySelected() - Keys.onEscapePressed:root.close() - Keys.onSpacePressed:root.peek=!root.peek - // Typing goes to the search field. - Keys.onPressed:event=>{ - if(event.text && event.text.trim() && !(event.modifiers&(Qt.ControlModifier|Qt.AltModifier|Qt.MetaModifier))) { - search.forceActiveFocus();search.text+=event.text;event.accepted=true; - } + GlassIconButton {text:"⚙";onClicked:ShellState.openSettings("wallpaper");Accessible.name:"Wallpaper settings"} + GlassIconButton {text:"×";onClicked:ShellState.wallpaperPickerOpen=false;Accessible.name:"Close picker"} + } + RowLayout { + GlassButton {text:"All";accented:root.filter==="all";onClicked:root.filter="all"} + GlassButton {text:"History";accented:root.filter==="history";onClicked:root.filter="history"} + GlassTextField {id:search;objectName:"wallpaperSearch";Layout.fillWidth:true;placeholderText:"Search wallpapers…";onTextChanged:root.select(0);Keys.onEscapePressed:ShellState.wallpaperPickerOpen=false;Keys.onDownPressed:view.forceActiveFocus()} + GlassIconButton {text:"↻";onClicked:WallpaperService.scan();Accessible.name:"Refresh wallpapers"} + } + ListView { + id:view + objectName:"wallpaperGallery" + Layout.fillWidth:true;Layout.fillHeight:true + spacing:root.gap + clip:true + model:root.rows + boundsBehavior:Flickable.StopAtBounds + ScrollBar.vertical:ScrollBar {} + Keys.onLeftPressed:root.select(root.current-1) + Keys.onRightPressed:root.select(root.current+1) + Keys.onUpPressed:root.vertical(-1) + Keys.onDownPressed:root.vertical(1) + Keys.onReturnPressed:root.applyCurrent() + Keys.onEnterPressed:root.applyCurrent() + Keys.onEscapePressed:ShellState.wallpaperPickerOpen=false + delegate:Item { + id:rowItem + required property var modelData + width:view.width + height:modelData.height + function tileAt(index) { + for(let i=0;is) - delegate:Rectangle { - required property string modelData - width:24;height:24;radius:12 - color:Qt.alpha("black",0.55) - Text {anchors.centerIn:parent;text:parent.modelData;color:"white";font.pixelSize:13} + scale:hover.containsMouse && !tile.selected ? 1.02 : 1 + Behavior on scale {NumberAnimation {duration:Theme.duration;easing.type:Easing.OutCubic}} + Image { + anchors.fill:parent + source:tile.image ? tile.image.url : "" + sourceSize:Qt.size(Math.round(tile.width*1.5),Math.round(tile.height*1.5)) + asynchronous:true + fillMode:Image.PreserveAspectCrop + opacity:status===Image.Ready ? 1 : 0 + Behavior on opacity {NumberAnimation {duration:Theme.duration}} + layer.enabled:true + layer.effect:MultiEffect {maskEnabled:true;maskSource:mask;maskThresholdMin:0.5;maskSpreadAtMin:1} + } + Item { + id:mask + anchors.fill:parent + visible:false + layer.enabled:true + Rectangle {anchors.fill:parent;radius:12} + } + Rectangle { + anchors.fill:parent;radius:12;color:"transparent" + border.width:tile.selected ? 3 : 1 + border.color:tile.selected ? Theme.accent : Theme.border + } + // Name on the selected or hovered thumbnail only. + Rectangle { + anchors.left:parent.left;anchors.right:parent.right;anchors.bottom:parent.bottom;anchors.margins:3 + height:30;radius:9 + color:Qt.alpha(Theme.surface,0.78) + opacity:tile.selected || hover.containsMouse ? 1 : 0 + Behavior on opacity {NumberAnimation {duration:Theme.duration}} + Text { + anchors.fill:parent;anchors.leftMargin:10;anchors.rightMargin:10 + verticalAlignment:Text.AlignVCenter + text:tile.image ? tile.image.name : "" + color:Theme.text;font.pixelSize:12;elide:Text.ElideMiddle + } + } + // ✦ the subject's outline is drawn first · ✓ current wallpaper + Row { + anchors.top:parent.top;anchors.right:parent.right;anchors.margins:7;spacing:5 + Repeater { + model:tile.image ? [WallpaperService.outlineStatus[tile.image.path]==="outline" ? "✦" : "", + tile.image.path===WallpaperService.currentPath ? "✓" : ""].filter(s=>s) : [] + delegate:Rectangle { + required property string modelData + width:22;height:22;radius:11 + color:Qt.alpha("black",0.55) + Text {anchors.centerIn:parent;text:parent.modelData;color:"white";font.pixelSize:12} + } } } } - } - // Click previews, double-click applies. - MouseArea { - id:tileArea - anchors.fill:parent - hoverEnabled:true - onClicked:{root.select(cell.index);view.forceActiveFocus();} - onDoubleClicked:{root.select(cell.index);root.applySelected();} + MouseArea { + id:hover + anchors.fill:parent + hoverEnabled:true + onClicked:{root.current=tile.modelData.index;view.forceActiveFocus();root.applyCurrent();} + } } } } - Text {visible:!root.results.length;text:WallpaperService.scanning ? "Loading wallpapers…" : "No wallpapers here. Choose a folder in Wallpaper settings.";color:Theme.textSecondary;Layout.fillWidth:true;wrapMode:Text.Wrap} - Text { - text:WallpaperService.error || (root.applying ? "Applying wallpaper…" : "Click or arrows preview · Double-click or Enter apply · Space peek · type to search · Esc close") - color:WallpaperService.error ? Theme.urgent : Theme.textSecondary - Layout.fillWidth:true;elide:Text.ElideRight - } } - } - // While peeking, a click or any key brings the sheet back. - Text { - anchors.bottom:parent.bottom;anchors.horizontalCenter:parent.horizontalCenter;anchors.bottomMargin:28 - visible:root.peek && root.open - text:"Space to show wallpapers · Enter apply · Esc close" - color:"white";font.pixelSize:14 - layer.enabled:true - layer.effect:MultiEffect {shadowEnabled:true;shadowBlur:0.6;shadowOpacity:0.8;shadowColor:"black"} + Text {visible:!root.results.length;text:WallpaperService.scanning ? "Loading wallpapers…" : "No wallpapers here. Choose a folder in Wallpaper settings.";color:Theme.textSecondary;Layout.fillWidth:true;wrapMode:Text.Wrap} + Text {text:WallpaperService.error || (WallpaperService.busy?"Applying wallpaper…":"Click or arrows and Enter to apply · ✦ outline transition · Esc Close");color:WallpaperService.error?Theme.urgent:Theme.textSecondary;Layout.fillWidth:true;wrapMode:Text.Wrap} } } }