mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix: 修复任务栏关机按钮右键菜单无法响应的问题
完善菜单项的点击接口,保证其能正确触发对应的菜单功能 Log: Influence: 任务栏-时尚模式下右键菜单功能 Task: https://pms.uniontech.com/task-view-110311.html Change-Id: Id8d7d767534543d15eda79f77012e21ccdb2527d
This commit is contained in:
parent
322623427d
commit
44b92d90f5
@ -239,6 +239,11 @@ const QString StretchPluginsItem::contextMenu() const
|
||||
return m_pluginInter->itemContextMenu(m_itemKey);
|
||||
}
|
||||
|
||||
void StretchPluginsItem::invokedMenuItem(const QString &itemId, const bool checked)
|
||||
{
|
||||
m_pluginInter->invokedMenuItem(m_itemKey, itemId, checked);
|
||||
}
|
||||
|
||||
void StretchPluginsItem::mousePressEvent(QMouseEvent *e)
|
||||
{
|
||||
m_hover = false;
|
||||
|
@ -80,6 +80,7 @@ protected:
|
||||
void mouseReleaseEvent(QMouseEvent *e) override;
|
||||
|
||||
const QString contextMenu() const override;
|
||||
void invokedMenuItem(const QString &itemId, const bool checked) override;
|
||||
|
||||
private:
|
||||
void mouseClick();
|
||||
|
@ -237,7 +237,7 @@ void ShutdownPlugin::invokedMenuItem(const QString &itemKey, const QString &menu
|
||||
.service("com.deepin.dde.ControlCenter")
|
||||
.interface("com.deepin.dde.ControlCenter")
|
||||
.path("/com/deepin/dde/ControlCenter")
|
||||
.method(QString("ShowModule"))
|
||||
.method(QString("ShowPage"))
|
||||
.arg(QString("power"))
|
||||
.call();
|
||||
} else if (menuId == "Lock") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user