From 0f39f171d23f97661599c5bde1e8d6e87879ab5d Mon Sep 17 00:00:00 2001 From: Zachary Hall Date: Tue, 23 Jan 2024 13:22:08 -0800 Subject: [PATCH] Make it build on Arch and add back/forward mouse button support. --- CMakeLists.txt | 2 +- qml/main.qml | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8538766..1f95b33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,7 +91,7 @@ target_link_libraries(cutefish-filemanager ) file(GLOB TS_FILES translations/*.ts) -qt5_create_translation(QM_FILES ${TS_FILES}) +qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES}) add_custom_target(translations DEPENDS ${QM_FILES} SOURCES ${TS_FILES}) add_dependencies(cutefish-filemanager translations) diff --git a/qml/main.qml b/qml/main.qml index 4a57e5b..688db75 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -129,4 +129,15 @@ FishUI.Window { } } } + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.ForwardButton|Qt.BackButton + onClicked: { + if (mouse.button == Qt.ForwardButton) { + _folderPage.goForward() + } else if (mouse.button == Qt.BackButton) { + _folderPage.goBack() + } + } + } }