From 8a6679eace029338747f0fe95ca683016fce783e Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Mon, 7 Jul 2025 17:58:18 +1000 Subject: paths: decode urls Fixes spaces in paths breaking things --- modules/background/Wallpaper.qml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/background') diff --git a/modules/background/Wallpaper.qml b/modules/background/Wallpaper.qml index 7238303..ef25885 100644 --- a/modules/background/Wallpaper.qml +++ b/modules/background/Wallpaper.qml @@ -3,6 +3,7 @@ pragma ComponentBehavior: Bound import "root:/widgets" import "root:/services" import "root:/config" +import "root:/utils" import QtQuick import QtQuick.Dialogs @@ -63,9 +64,10 @@ Item { FileDialog { id: dialog + title: qsTr("Select a wallpaper") + acceptLabel: qsTr("Select") nameFilters: [`Image files (${Wallpapers.extensions.map(e => `*.${e}`).join(" ")})`] - - onAccepted: Wallpapers.setWallpaper(selectedFile.toString().replace("file://", "")) + onAccepted: Wallpapers.setWallpaper(Paths.strip(selectedFile)) } StateLayer { -- cgit v1.2.3-freya