diff --git a/qml/AppUI/SelectionPage.qml b/qml/AppUI/SelectionPage.qml index 1b28a37..eaf00b0 100644 --- a/qml/AppUI/SelectionPage.qml +++ b/qml/AppUI/SelectionPage.qml @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2023, KylinSoft Co., Ltd. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + import QtQuick 2.12 import QtQuick.Layouts 1.2 import org.ukui.menu.core 1.0 @@ -27,6 +45,11 @@ Item { } } + MouseArea { + anchors.fill: parent + onClicked: viewHide.start(); + } + GridView { id: selectionArea anchors.centerIn: parent @@ -56,7 +79,7 @@ Item { delegate: AppControls2.StyleBackground { height: selectionArea.itemHeight; width: selectionArea.itemWidth - alpha: itemMouseArea.containsPress ? 0.82 : itemMouseArea.containsMouse ? 0.55 : 0.00 + alpha: (itemMouseArea.containsPress && !model.isDisable) ? 0.82 : (itemMouseArea.containsMouse && !model.isDisable) ? 0.55 : 0.00 useStyleTransparent: false radius: 8 @@ -72,11 +95,12 @@ Item { MouseArea { id: itemMouseArea anchors.fill: parent - hoverEnabled: true - visible: !model.isDisable + hoverEnabled: !model.isDisable onClicked: { - viewHide.start(); - root.labelSelected(model.id); + if (!model.isDisable) { + viewHide.start(); + root.labelSelected(model.id); + } } } } diff --git a/qml/extensions/FavoriteExtension.qml b/qml/extensions/FavoriteExtension.qml index b52b1b3..1bd8566 100644 --- a/qml/extensions/FavoriteExtension.qml +++ b/qml/extensions/FavoriteExtension.qml @@ -47,7 +47,9 @@ UkuiMenuExtension { id: favoriteView anchors.fill: parent anchors.leftMargin: 16 - anchors.topMargin: 14 + anchors.topMargin: 12 + anchors.bottomMargin: 6 + clip: true cellWidth: itemHeight + spacing; cellHeight: cellWidth property int exchangedStartIndex: 0 property int spacing: 4