From f36b16229e5e566054a7e8441de2ccc16c3daddd Mon Sep 17 00:00:00 2001 From: hewenfei Date: Sun, 4 Feb 2024 11:46:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=85=A8=E5=B1=8F?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E6=89=93=E5=BC=80=E5=8F=B3=E9=94=AE=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qml/AppUI/FullScreenAppList.qml | 4 ++-- src/extension/favorite/favorite-context-menu.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qml/AppUI/FullScreenAppList.qml b/qml/AppUI/FullScreenAppList.qml index d58e5a5..a0ee456 100644 --- a/qml/AppUI/FullScreenAppList.qml +++ b/qml/AppUI/FullScreenAppList.qml @@ -92,8 +92,8 @@ ListView { if (event.button === Qt.LeftButton) { // openApplication appManager.launchApp(id); - } else if (mouse.button === Qt.RightButton) { - // appListView.model.openMenu(index, MenuInfo.FullScreen); + } else if (event.button === Qt.RightButton) { + menuManager.showMenu(model.id, MenuInfo.FullScreen); } } } diff --git a/src/extension/favorite/favorite-context-menu.cpp b/src/extension/favorite/favorite-context-menu.cpp index d09ce71..fa04d2b 100644 --- a/src/extension/favorite/favorite-context-menu.cpp +++ b/src/extension/favorite/favorite-context-menu.cpp @@ -49,6 +49,7 @@ FavoriteContextMenu::actions(const DataEntity &data, QMenu *parent, const MenuIn switch (location) { case MenuInfo::AppList: + case MenuInfo::FullScreen: case MenuInfo::FolderPage: { if (data.favorite() == 0) { list << new QAction(QObject::tr("Fix to favorite"), parent); @@ -79,7 +80,6 @@ FavoriteContextMenu::actions(const DataEntity &data, QMenu *parent, const MenuIn appendActionsForAppsOutsideFolder(parent, data.id(), list); break; } - case MenuInfo::FullScreen: case MenuInfo::Folder: { appendActionsForAppsInFolder(parent, data.id(), list); break; @@ -115,7 +115,7 @@ void FavoriteContextMenu::appendActionsForAppsOutsideFolder(QObject *parent, con for (auto folder : FavoriteFolderHelper::instance()->folderData()) { QString folderName = folder.getName(); int folderId = folder.getId(); - QAction *subAction = new QAction(QObject::tr("Add to ").append(folderName), parent); + QAction *subAction = new QAction(QObject::tr("Add to \"%1\"").arg(folderName), parent); QObject::connect(subAction, &QAction::triggered, parent, [appId, folderId] { FavoritesModel::instance().addAppToFolder(appId, QString::number(folderId)); });