From 2180ec57843013241d9e74a168517da536c91496 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Sat, 11 Apr 2026 08:03:42 +0200 Subject: [PATCH] Add directory picker for OpenVR library --- dashboard/qml/SettingsPage.qml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/dashboard/qml/SettingsPage.qml b/dashboard/qml/SettingsPage.qml index 35755c2e..49bc7482 100644 --- a/dashboard/qml/SettingsPage.qml +++ b/dashboard/qml/SettingsPage.qml @@ -187,6 +187,14 @@ Kirigami.ScrollablePage { } } + Dialogs.FolderDialog{ + id: openvr_browse + onAccepted: { + currentFolder = selectedFolder + openvr_text.text = WivrnServer.host_path(new URL(selectedFolder).pathname); + openvr_text.text = openvr_text.text.replace(/\/linux64$/, "").replace(/\/bin$/, "") + } + } RowLayout { Kirigami.FormData.label: i18n("OpenVR compatibility library:") Layout.fillWidth: true @@ -211,6 +219,10 @@ Kirigami.ScrollablePage { } } } + onActivated: index => { + if (openvr_libs.get(index).is_custom && openvr_text.text == "") + openvr_browse.open() + } } Controls.TextField { id: openvr_text @@ -218,6 +230,11 @@ Kirigami.ScrollablePage { visible: !!openvr_combobox.model.get(openvr_combobox.currentIndex)?.is_custom Layout.fillWidth: true } + Controls.Button { + text: i18nc("browse to choose the OpenVR compatility to use", "Browse") + visible: openvr_text.visible + onClicked: openvr_browse.open() + } } }