diff --git a/cutefish-filemanager.desktop b/cutefish-filemanager.desktop index 814e7ea..849ae87 100644 --- a/cutefish-filemanager.desktop +++ b/cutefish-filemanager.desktop @@ -4,8 +4,8 @@ Name=File Manager Name[zh_CN]=文件管理 GenericName=File Manager Comment=Cutefish File Manager -Exec=cutefish-filemanager %U +Exec=cutefish-filemanager %u MimeType=inode/directory; Icon=file-system-manager -Categories=FileManager;Utility;Core;Qt; +Categories=Qt;System;FileTools;FileManager; StartupNotify=true \ No newline at end of file diff --git a/desktop/desktopview.cpp b/desktop/desktopview.cpp index 78541e3..7921855 100644 --- a/desktop/desktopview.cpp +++ b/desktop/desktopview.cpp @@ -35,14 +35,13 @@ DesktopView::DesktopView(QQuickView *parent) m_screenRect = qApp->primaryScreen()->geometry(); m_screenAvailableRect = qApp->primaryScreen()->availableGeometry(); - setTitle(tr("Desktop")); - KWindowSystem::setType(winId(), NET::Desktop); KWindowSystem::setState(winId(), NET::KeepBelow); engine()->rootContext()->setContextProperty("desktopView", this); engine()->addImageProvider("thumbnailer", new Thumbnailer()); + setTitle(tr("Desktop")); setScreen(qApp->primaryScreen()); setResizeMode(QQuickView::SizeRootObjectToView); setSource(QStringLiteral("qrc:/qml/Desktop/main.qml")); diff --git a/qml/FolderGridItem.qml b/qml/FolderGridItem.qml index 6da0a59..fa6967c 100644 --- a/qml/FolderGridItem.qml +++ b/qml/FolderGridItem.qml @@ -31,7 +31,7 @@ Item { color: selected || hovered ? Meui.Theme.highlightColor : "transparent" radius: Meui.Theme.mediumRadius visible: selected || hovered - opacity: selected ? 1.0 : 0.4 + opacity: selected ? 1.0 : 0.2 } Item { diff --git a/qml/FolderGridView.qml b/qml/FolderGridView.qml index 2578f8f..1603a32 100644 --- a/qml/FolderGridView.qml +++ b/qml/FolderGridView.qml @@ -316,7 +316,7 @@ GridView { control.rubberBand = null control.interactive = true - // control.cachedRectangleSelection = null + control.cachedRectangleSelection = null folderModel.unpinSelection() } diff --git a/qml/FolderListItem.qml b/qml/FolderListItem.qml index 825800d..9690147 100644 --- a/qml/FolderListItem.qml +++ b/qml/FolderListItem.qml @@ -6,7 +6,7 @@ import MeuiKit 1.0 as Meui Item { id: _listItem width: ListView.view.width - ListView.view.leftMargin - ListView.view.rightMargin - height: Meui.Units.fontMetrics.height * 2 + Meui.Units.largeSpacing + height: ListView.view.itemHeight Accessible.name: fileName Accessible.role: Accessible.Canvas @@ -39,7 +39,7 @@ Item { id: _background anchors.fill: parent radius: Meui.Theme.smallRadius - color: selected ? selectedColor : hovered ? hoveredColor : "transparent" + color: selected ? Meui.Theme.highlightColor : hovered ? hoveredColor : "transparent" visible: selected || hovered } @@ -88,21 +88,21 @@ Item { id: _label text: model.fileName Layout.fillWidth: true - color: Meui.Theme.textColor + color: selected ? Meui.Theme.highlightedTextColor : Meui.Theme.textColor elide: Qt.ElideMiddle } Label { id: _label2 text: model.fileSize - color: Meui.Theme.disabledTextColor + color: selected ? Meui.Theme.highlightedTextColor : Meui.Theme.disabledTextColor Layout.fillWidth: true } } Label { text: model.modified - color: Meui.Theme.disabledTextColor + color: selected ? Meui.Theme.highlightedTextColor : Meui.Theme.disabledTextColor } } } diff --git a/qml/FolderListView.qml b/qml/FolderListView.qml index 5320535..ac54ebd 100644 --- a/qml/FolderListView.qml +++ b/qml/FolderListView.qml @@ -27,6 +27,10 @@ ListView { property Item editor: null property int anchorIndex: 0 + property var itemHeight: Meui.Units.fontMetrics.height * 2 + Meui.Units.largeSpacing + + property variant cachedRectangleSelection: null + signal keyPress(var event) currentIndex: -1 @@ -58,6 +62,16 @@ ListView { } } + onCachedRectangleSelectionChanged: { + if (cachedRectangleSelection === null) + return + + if (cachedRectangleSelection.length) + control.currentIndex[0] + + folderModel.updateSelection(cachedRectangleSelection, control.ctrlPressed) + } + onContentXChanged: { cancelRename() } @@ -266,7 +280,7 @@ ListView { control.rubberBand = null control.interactive = true - // control.cachedRectangleSelection = null + control.cachedRectangleSelection = null folderModel.unpinSelection() } @@ -281,7 +295,13 @@ ListView { } function rectangleSelect(x, y, width, height) { - + var indexes = [] + for (var i = y; i <= y + height; i += 10) { + const index = control.indexAt(x, i) + if(!indexes.includes(index) && index > -1 && index< control.count) + indexes.push(index) + } + cachedRectangleSelection = indexes } function updateSelection(modifier) { diff --git a/qml/SideBar.qml b/qml/SideBar.qml index 1d14f9d..a63e8f2 100644 --- a/qml/SideBar.qml +++ b/qml/SideBar.qml @@ -21,7 +21,7 @@ ListView { leftMargin: Meui.Units.smallSpacing rightMargin: Meui.Units.smallSpacing bottomMargin: Meui.Units.smallSpacing - spacing: Meui.Units.largeSpacing + spacing: Meui.Units.smallSpacing ScrollBar.vertical: ScrollBar { bottomPadding: Meui.Units.smallSpacing