internal: use Qt.resolvedUrl
This commit is contained in:
parent
767ced0df3
commit
717855c629
7 changed files with 7 additions and 7 deletions
|
|
@ -76,7 +76,7 @@ MouseArea {
|
||||||
}
|
}
|
||||||
|
|
||||||
function save(): void {
|
function save(): void {
|
||||||
const tmpfile = `file:///tmp/caelestia-picker-${Quickshell.processId}-${Date.now()}.png`;
|
const tmpfile = Qt.resolvedUrl(`/tmp/caelestia-picker-${Quickshell.processId}-${Date.now()}.png`);
|
||||||
CUtils.saveItem(screencopy, tmpfile, Qt.rect(Math.ceil(rsx), Math.ceil(rsy), Math.floor(sw), Math.floor(sh)), path => Quickshell.execDetached(["swappy", "-f", path]));
|
CUtils.saveItem(screencopy, tmpfile, Qt.rect(Math.ceil(rsx), Math.ceil(rsy), Math.floor(sw), Math.floor(sh)), path => Quickshell.execDetached(["swappy", "-f", path]));
|
||||||
closeAnim.start();
|
closeAnim.start();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ MouseArea {
|
||||||
let icon = root.modelData.icon;
|
let icon = root.modelData.icon;
|
||||||
if (icon.includes("?path=")) {
|
if (icon.includes("?path=")) {
|
||||||
const [name, path] = icon.split("?path=");
|
const [name, path] = icon.split("?path=");
|
||||||
icon = `file://${path}/${name.slice(name.lastIndexOf("/") + 1)}`;
|
icon = Qt.resolvedUrl(`${path}/${name.slice(name.lastIndexOf("/") + 1)}`);
|
||||||
}
|
}
|
||||||
return icon;
|
return icon;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ Item {
|
||||||
required property Item source
|
required property Item source
|
||||||
readonly property Item maskSource: mask
|
readonly property Item maskSource: mask
|
||||||
|
|
||||||
fragmentShader: `file://${Quickshell.shellDir}/assets/shaders/opacitymask.frag.qsb`
|
fragmentShader: Qt.resolvedUrl(`${Quickshell.shellDir}/assets/shaders/opacitymask.frag.qsb`)
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ Item {
|
||||||
filterLabel: qsTr("Image files")
|
filterLabel: qsTr("Image files")
|
||||||
filters: Images.validImageExtensions
|
filters: Images.validImageExtensions
|
||||||
onAccepted: path => {
|
onAccepted: path => {
|
||||||
if (CUtils.copyFile(`file://${path}`, Qt.resolvedUrl(`${Paths.home}/.face`)))
|
if (CUtils.copyFile(Qt.resolvedUrl(path), Qt.resolvedUrl(`${Paths.home}/.face`)))
|
||||||
Quickshell.execDetached(["notify-send", "-a", "caelestia-shell", "-u", "low", "-h", `STRING:image-path:${path}`, "Profile picture changed", `Profile picture changed to ${Paths.shortenHome(path)}`]);
|
Quickshell.execDetached(["notify-send", "-a", "caelestia-shell", "-u", "low", "-h", `STRING:image-path:${path}`, "Profile picture changed", `Profile picture changed to ${Paths.shortenHome(path)}`]);
|
||||||
else
|
else
|
||||||
Quickshell.execDetached(["notify-send", "-a", "caelestia-shell", "-u", "critical", "Unable to change profile picture", `Failed to change profile picture to ${Paths.shortenHome(path)}`]);
|
Quickshell.execDetached(["notify-send", "-a", "caelestia-shell", "-u", "critical", "Unable to change profile picture", `Failed to change profile picture to ${Paths.shortenHome(path)}`]);
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ Item {
|
||||||
required property Item source
|
required property Item source
|
||||||
readonly property Item maskSource: mask
|
readonly property Item maskSource: mask
|
||||||
|
|
||||||
fragmentShader: `file://${Quickshell.shellDir}/assets/shaders/opacitymask.frag.qsb`
|
fragmentShader: Qt.resolvedUrl(`${Quickshell.shellDir}/assets/shaders/opacitymask.frag.qsb`)
|
||||||
}
|
}
|
||||||
|
|
||||||
opacity: status === Image.Ready ? 1 : 0
|
opacity: status === Image.Ready ? 1 : 0
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ ColumnLayout {
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
source: `file://${Quickshell.shellDir}/assets/dino.png`
|
source: Qt.resolvedUrl(`${Quickshell.shellDir}/assets/dino.png`)
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
sourceSize.width: clipRect.width * 0.8
|
sourceSize.width: clipRect.width * 0.8
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Singleton {
|
||||||
property string osPrettyName
|
property string osPrettyName
|
||||||
property string osId
|
property string osId
|
||||||
property list<string> osIdLike
|
property list<string> osIdLike
|
||||||
property string osLogo: `file://${Quickshell.shellDir}/assets/logo.svg`
|
property string osLogo: Qt.resolvedUrl(`${Quickshell.shellDir}/assets/logo.svg`)
|
||||||
property bool isDefaultLogo: true
|
property bool isDefaultLogo: true
|
||||||
|
|
||||||
property string uptime
|
property string uptime
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue