mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
feat: 解决鼠标移动右键菜单消失问题
坐标计算时没有考虑系统缩放率导致计算错误 Log: 优化右键菜单消失逻辑 Influence: 任务栏-鼠标移动时右键菜单的显示和隐藏 Task: https://pms.uniontech.com/zentao/task-view-91107.html Change-Id: Ifbe921f47f9516d1bb5f3de11e283a2a11029eb2
This commit is contained in:
parent
f5d34f1560
commit
5a5703da6a
@ -48,7 +48,8 @@ Menu::Menu(QWidget *dockItem, QWidget *parent)
|
||||
|
||||
void Menu::onButtonPress()
|
||||
{
|
||||
if (!QRect(m_dockInter->frontendWindowRect()).contains(QCursor::pos()))
|
||||
QPoint curPos = QCursor::pos() * qApp->devicePixelRatio();
|
||||
if (!QRect(m_dockInter->frontendWindowRect()).contains(curPos))
|
||||
this->hide();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user