NInputButton properly uses NTextInput

This commit is contained in:
LemmyCook
2025-09-21 20:49:46 -04:00
parent 46c3ea5d22
commit a7e3deecd3
6 changed files with 24 additions and 71 deletions
+3 -9
View File
@@ -37,21 +37,15 @@ ColumnLayout {
placeholderText: "/home/user/.face"
buttonIcon: "photo"
buttonTooltip: "Browse for avatar image"
onInputEditingFinished: {
Settings.data.general.avatarImage = text
}
onInputEditingFinished: Settings.data.general.avatarImage = text
onButtonClicked: {
FilePickerService.open({
"title": "Select Avatar Image",
"initialPath": Settings.data.general.avatarImage || Quickshell.env("HOME"),
"selectFiles": true,
"scaling": scaling,
"onSelected": function (path) {
Settings.data.general.avatarImage = path
text = path
},
"parent": root
"parent": root,
"onSelected": path => Settings.data.general.avatarImage = path
})
}
}
@@ -27,21 +27,15 @@ ColumnLayout {
text: Settings.data.screenRecorder.directory
buttonIcon: "folder-open"
buttonTooltip: "Browse for output folder"
onInputEditingFinished: {
Settings.data.screenRecorder.directory = text
}
onInputEditingFinished: Settings.data.screenRecorder.directory = text
onButtonClicked: {
FilePickerService.open({
"title": "Select Output Folder",
"initialPath": Settings.data.screenRecorder.directory || Quickshell.env("HOME") + "/Videos",
"selectFiles": false,
"scaling": scaling,
"onSelected": function (path) {
Settings.data.screenRecorder.directory = path
text = path
},
"parent": root
"parent": root,
"onSelected": path => Settings.data.screenRecorder.directory = path
})
}
}
+4 -9
View File
@@ -350,11 +350,8 @@ ColumnLayout {
"initialPath": Settings.data.wallpaper.directory || Quickshell.env("HOME"),
"selectFiles": false,
"scaling": scaling,
"onSelected": function (path) {
Settings.data.wallpaper.directory = path
wallpaperPathInput.text = path
},
"parent": root
"parent": root,
"onSelected": path => Settings.data.wallpaper.directory = path
})
}
@@ -364,10 +361,8 @@ ColumnLayout {
"initialPath": WallpaperService.getMonitorDirectory(monitorName),
"selectFiles": false,
"scaling": scaling,
"onSelected": function (path) {
WallpaperService.setMonitorDirectory(monitorName, path)
},
"parent": root
"parent": root,
"onSelected": path => WallpaperService.setMonitorDirectory(monitorName, path)
})
}
}