diff --git a/src/qml/components/StorageLocations.qml b/src/qml/components/StorageLocations.qml index b5fac4aa4d..acf94c2c29 100644 --- a/src/qml/components/StorageLocations.qml +++ b/src/qml/components/StorageLocations.qml @@ -29,7 +29,28 @@ ColumnLayout { ButtonGroup.group: group text: qsTr("Custom") description: qsTr("Choose the directory and storage device.") - onClicked: fileDialog.open() + onClicked: { + if (AppMode.isDesktop) { + if (!singleClickTimer.running) { + // Start the timer if it's not already running + singleClickTimer.start(); + } else { + // If the timer is running, it's a double-click + singleClickTimer.stop(); + } + } else { + fileDialog.open() + } + } + Timer { + id: singleClickTimer + interval: 50 + onTriggered: { + // If the timer times out, it's a single-click + fileDialog.open() + } + repeat: false // No need to repeat the timer + } } FileDialog { id: fileDialog