SettingsWindow: allow tilde usage

This commit is contained in:
lysec
2025-10-12 21:13:52 +02:00
parent 427f87b320
commit d442f306c2
7 changed files with 31 additions and 13 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ NBox {
NImageCircled {
width: Style.baseWidgetSize * 1.25 * scaling
height: Style.baseWidgetSize * 1.25 * scaling
imagePath: Settings.data.general.avatarImage
imagePath: Settings.preprocessPath(Settings.data.general.avatarImage)
fallbackIcon: "person"
borderColor: Color.mPrimary
borderWidth: Math.max(1, Style.borderM * scaling)
+1 -1
View File
@@ -32,7 +32,7 @@ NBox {
NImageCircled {
width: Style.baseWidgetSize * 1.25 * scaling
height: width
imagePath: Settings.data.general.avatarImage
imagePath: Settings.preprocessPath(Settings.data.general.avatarImage)
fallbackIcon: "person"
borderColor: Color.mPrimary
borderWidth: Math.max(1, Style.borderM * scaling)
+1 -1
View File
@@ -299,7 +299,7 @@ Loader {
anchors.centerIn: parent
width: 66 * scaling
height: 66 * scaling
imagePath: Settings.data.general.avatarImage
imagePath: Settings.preprocessPath(Settings.data.general.avatarImage)
fallbackIcon: "person"
SequentialAnimation on scale {
+2 -2
View File
@@ -23,7 +23,7 @@ ColumnLayout {
NImageCircled {
width: 108 * scaling
height: 108 * scaling
imagePath: Settings.data.general.avatarImage
imagePath: Settings.preprocessPath(Settings.data.general.avatarImage)
fallbackIcon: "person"
borderColor: Color.mPrimary
borderWidth: Math.max(1, Style.borderM * scaling)
@@ -50,7 +50,7 @@ ColumnLayout {
id: avatarPicker
title: I18n.tr("settings.general.profile.select-avatar")
selectionMode: "files"
initialPath: Settings.data.general.avatarImage.substr(0, Settings.data.general.avatarImage.lastIndexOf("/")) || Quickshell.env("HOME")
initialPath: Settings.preprocessPath(Settings.data.general.avatarImage).substr(0, Settings.preprocessPath(Settings.data.general.avatarImage).lastIndexOf("/")) || Quickshell.env("HOME")
nameFilters: ["*.jpg", "*.jpeg", "*.png", "*.gif", "*.pnm", "*.bmp"]
onAccepted: paths => {
if (paths.length > 0) {