From 561b1ce0ac54f1963019b13da769712c34314e32 Mon Sep 17 00:00:00 2001 From: reionwong Date: Mon, 28 Mar 2022 15:35:48 +0800 Subject: [PATCH] feat: optimize low configuration performance --- qml/FolderGridView.qml | 7 ++++--- qml/FolderListView.qml | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/qml/FolderGridView.qml b/qml/FolderGridView.qml index 1c09e8b..feae33b 100644 --- a/qml/FolderGridView.qml +++ b/qml/FolderGridView.qml @@ -16,9 +16,9 @@ * along with this program. If not, see . */ -import QtQuick 2.12 -import QtQuick.Controls 2.12 -import QtQuick.Layouts 1.12 +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 import Cutefish.FileManager 1.0 import Cutefish.DragDrop 1.0 as DragDrop @@ -67,6 +67,7 @@ GridView { signal keyPress(var event) cacheBuffer: Math.max(0, control.height * 1.5) + reuseItems: true onIconSizeChanged: { // 图标大小改变时需要重置状态,否则选中定位不准确 diff --git a/qml/FolderListView.qml b/qml/FolderListView.qml index a6914fd..a2c5b2a 100644 --- a/qml/FolderListView.qml +++ b/qml/FolderListView.qml @@ -16,9 +16,9 @@ * along with this program. If not, see . */ -import QtQuick 2.12 -import QtQuick.Controls 2.12 -import QtQuick.Layouts 1.12 +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 import FishUI 1.0 as FishUI import Cutefish.FileManager 1.0 import Cutefish.DragDrop 1.0 as DragDrop @@ -55,6 +55,7 @@ ListView { clip: true cacheBuffer: width + reuseItems: true ScrollBar.vertical: ScrollBar { } boundsBehavior: Flickable.StopAtBounds