lots of changes

This commit is contained in:
Zacharias-Brohn
2025-11-19 17:01:20 +01:00
parent ddae364005
commit 07e399f6d9
19 changed files with 611 additions and 53 deletions
+28
View File
@@ -0,0 +1,28 @@
import ZShell.Internal
import Quickshell
import QtQuick
import qs.Paths
Image {
id: root
property alias path: manager.path
asynchronous: true
fillMode: Image.PreserveAspectCrop
Connections {
target: QsWindow.window
function onDevicePixelRatioChanged(): void {
manager.updateSource();
}
}
CachingImageManager {
id: manager
item: root
cacheDir: Qt.resolvedUrl(Paths.imagecache)
}
}
+31
View File
@@ -4,11 +4,33 @@ import Quickshell
import Quickshell.Io
import qs.Config
import qs.Modules
import qs.Helpers
import ZShell.Models
Searcher {
id: root
readonly property string currentNamePath: WallpaperPath.currentWallpaperPath
property bool showPreview: false
readonly property string current: showPreview ? previewPath : actualCurrent
property string previewPath
property string actualCurrent: WallpaperPath.currentWallpaperPath
function setWallpaper(path: string): void {
actualCurrent = path;
WallpaperPath.currentWallpaperPath = path;
}
function preview(path: string): void {
previewPath = path;
showPreview = true;
}
function stopPreview(): void {
showPreview = false;
}
list: wallpapers.entries
key: "relativePath"
useFuzzy: true
@@ -16,6 +38,15 @@ Searcher {
forward: false
})
FileView {
path: root.currentNamePath
watchChanges: true
onFileChanged: reload()
onLoaded: {
root.actualCurrent = this.text;
}
}
FileSystemModel {
id: wallpapers
+6
View File
@@ -0,0 +1,6 @@
import QtQuick
Text {
renderType: Text.NativeRendering
textFormat: Text.PlainText
}