From 229a1746220dc72452120014246ec5d22e96b517 Mon Sep 17 00:00:00 2001 From: reven Date: Wed, 14 Apr 2021 23:40:22 +0800 Subject: [PATCH] Fix ctrl and shift selection --- qml/FolderGridView.qml | 2 ++ qml/FolderListView.qml | 2 ++ qml/GlobalSettings.qml | 4 ++-- qml/main.qml | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/qml/FolderGridView.qml b/qml/FolderGridView.qml index 9f43554..68b7bbc 100644 --- a/qml/FolderGridView.qml +++ b/qml/FolderGridView.qml @@ -417,6 +417,8 @@ GridView { // 当选择多个文件的时候,在这选择里的文件中点击 if (pressedItem != null && !control.rubberBand && + !control.shiftPressed && + !control.ctrlPressed && !dirModel.dragging) { dirModel.clearSelection() dirModel.setSelected(pressedItem.index) diff --git a/qml/FolderListView.qml b/qml/FolderListView.qml index fa56bf2..a9b9fe9 100644 --- a/qml/FolderListView.qml +++ b/qml/FolderListView.qml @@ -322,6 +322,8 @@ ListView { onReleased: { if (pressedItem != null && !control.rubberBand && + !control.shiftPressed && + !control.ctrlPressed && !dirModel.dragging) { dirModel.clearSelection() dirModel.setSelected(pressedItem.index) diff --git a/qml/GlobalSettings.qml b/qml/GlobalSettings.qml index 40d9781..018c5f6 100644 --- a/qml/GlobalSettings.qml +++ b/qml/GlobalSettings.qml @@ -8,7 +8,7 @@ Settings { property int height: 580 property int desktopIconSize: 72 property int maximumIconSize: 256 - property int minimumIconSize: 72 + property int minimumIconSize: 64 - property int gridIconSize: 72 + property int gridIconSize: 64 } diff --git a/qml/main.qml b/qml/main.qml index 2478c3f..6e1c994 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -85,7 +85,7 @@ FishUI.Window { SideBar { id: _sideBar Layout.fillHeight: true - width: 200 + FishUI.Units.largeSpacing + width: 180 + FishUI.Units.largeSpacing onClicked: _folderPage.openUrl(path) }