From 9101f7842701ba2f1b8ed8fe2c51efcf676ccb73 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Wed, 31 Jan 2024 16:12:39 -0500 Subject: [PATCH] Make FormFileDelegate functional --- launcher/ui/Components/FormFileDelegate.qml | 4 ++++ launcher/ui/Settings/ProfileSettings.qml | 2 ++ 2 files changed, 6 insertions(+) diff --git a/launcher/ui/Components/FormFileDelegate.qml b/launcher/ui/Components/FormFileDelegate.qml index 57b2395..46f8459 100644 --- a/launcher/ui/Components/FormFileDelegate.qml +++ b/launcher/ui/Components/FormFileDelegate.qml @@ -11,6 +11,8 @@ FormCard.FormButtonDelegate { property string file + signal accepted(string path) + icon.name: "document-open" description: file @@ -20,5 +22,7 @@ FormCard.FormButtonDelegate { id: dialog currentFolder: StandardPaths.standardLocations(StandardPaths.HomeLocation)[0] + + onAccepted: control.accepted(decodeURIComponent(selectedFile.toString().replace("file://", ""))) } } \ No newline at end of file diff --git a/launcher/ui/Settings/ProfileSettings.qml b/launcher/ui/Settings/ProfileSettings.qml index 96c9d86..125c871 100644 --- a/launcher/ui/Settings/ProfileSettings.qml +++ b/launcher/ui/Settings/ProfileSettings.qml @@ -99,6 +99,8 @@ FormCard.FormCardPage { text: i18n("Wine Executable") file: page.profile.winePath enabled: page.profile.wineType !== Profile.BuiltIn + + onAccepted: (path) => page.profile.winePath = path } FormCard.FormDelegateSeparator {