lots of changes
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user