From ea6cf814d954dd59c394c826bddec6a79941920a Mon Sep 17 00:00:00 2001 From: zhaoyingzhen Date: Fri, 27 Feb 2026 11:35:17 +0800 Subject: [PATCH] feat: show popup menu on NotifyHeader more button click MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - The more button in NotifyHeader previously called openNotificationSetting() directly on click - Now it shows a NotifySettingMenu popup with a "Notification Setting" menu item, consistent with GroupNotify's more button behavior - The menu is positioned centered below the more button - Uses the existing NotifySettingMenu component with modal and close-on-outside-click behavior - NotifyHeader 的 more 按钮之前点击直接调用 openNotificationSetting() - 现在改为弹出 NotifySettingMenu 菜单,包含"Notification Setting"选项 - 与 GroupNotify 的 more 按钮行为保持一致 - 菜单居中显示在按钮下方,使用已有的 NotifySettingMenu 组件 Log: show popup menu on NotifyHeader more button click Pms: BUG-284815 --- panels/notification/center/NotifyHeader.qml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/panels/notification/center/NotifyHeader.qml b/panels/notification/center/NotifyHeader.qml index cfc2b7d4f..035a61031 100644 --- a/panels/notification/center/NotifyHeader.qml +++ b/panels/notification/center/NotifyHeader.qml @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -123,8 +123,21 @@ FocusScope { event.accepted = true } onClicked: function () { - console.log("Notify setting") - NotifyAccessor.openNotificationSetting() + console.log("Notify setting menu") + headerSettingMenu.x = moreBtn.width / 2 - headerSettingMenu.width / 2 + headerSettingMenu.y = moreBtn.height + headerSettingMenu.toggle() + } + + NotifySettingMenu { + id: headerSettingMenu + MenuItem { + text: qsTr("Notification Setting") + onClicked: { + console.log("Notification setting") + NotifyAccessor.openNotificationSetting() + } + } } }