mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
fix: 修复wayland下打开快捷面板tooltip没有隐藏的问题
在打开快捷面板的时候,依次调用任务栏的插件图标的隐藏toolTip的功能将其隐藏 Log: Influence: 进入wayland,鼠标放在任务栏的插件上,点击应用弹出快捷面板,观察toolTip是否消失 Bug: https://pms.uniontech.com/bug-view-171551.html Change-Id: Iac6a7c1d55787a73d0f91952c7ca0585f41fd23a
This commit is contained in:
parent
b3172ccc96
commit
a406ebb68a
@ -202,6 +202,20 @@ bool QuickPluginWindow::eventFilter(QObject *watched, QEvent *event)
|
||||
if (!m_dragInfo->canDrag(mouseEvent->pos())) {
|
||||
// 弹出快捷设置面板
|
||||
DockPopupWindow *popWindow = QuickSettingContainer::popWindow();
|
||||
if (Utils::IS_WAYLAND_DISPLAY) {
|
||||
// TODO: 临时解决方案,如果是wayland环境,toolTip没有消失,因此,此处直接调用接口来隐藏
|
||||
for (int i = m_mainLayout->count() - 1; i >= 0; i--) {
|
||||
QLayoutItem *layoutItem = m_mainLayout->itemAt(i);
|
||||
if (!layoutItem)
|
||||
continue;
|
||||
|
||||
QuickDockItem *dockItem = qobject_cast<QuickDockItem *>(layoutItem->widget());
|
||||
if (!dockItem)
|
||||
continue;
|
||||
|
||||
dockItem->hideToolTip();
|
||||
}
|
||||
}
|
||||
popWindow->show(popupPoint());
|
||||
}
|
||||
m_dragInfo->reset();
|
||||
@ -533,6 +547,11 @@ bool QuickDockItem::isPrimary() const
|
||||
return false;
|
||||
}
|
||||
|
||||
void QuickDockItem::hideToolTip()
|
||||
{
|
||||
m_popupWindow->hide();
|
||||
}
|
||||
|
||||
void QuickDockItem::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
if (!m_pluginItem)
|
||||
|
@ -98,6 +98,7 @@ public:
|
||||
void setPositon(Dock::Position position);
|
||||
PluginsItemInterface *pluginItem();
|
||||
bool isPrimary() const;
|
||||
void hideToolTip();
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
|
Loading…
x
Reference in New Issue
Block a user