mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
fix: 修改“移除”提示标的坐标计算方法
关闭特效后图标计算的坐标有误差 Log: 修复窗口特效关闭后鼠标移除任务栏图标有时会失效的问题 Influence: dock栏图标拖动 Bug: https://pms.uniontech.com/bug-view-121323.html Change-Id: I540746f2f6bd6179cfeeb81fd7bc130f44f6b070
This commit is contained in:
parent
d88642fb30
commit
6cdbc693a4
@ -139,7 +139,7 @@ const QPoint AppDragWidget::popupMarkPoint(Dock::Position pos)
|
||||
break;
|
||||
case Bottom:
|
||||
if (!DWindowManagerHelper::instance()->hasComposite()) {
|
||||
p += QPoint(0 , -r.height() / 2);
|
||||
p += QPoint(size().width() / 2 , -r.height() / 2);
|
||||
} else {
|
||||
p += QPoint(r.width() / 2, 0);
|
||||
}
|
||||
@ -371,11 +371,7 @@ bool AppDragWidget::isRemoveItem()
|
||||
void AppDragWidget::onFollowMouse()
|
||||
{
|
||||
QPoint destPos = QCursor::pos();
|
||||
if (DWindowManagerHelper::instance()->hasComposite()) {
|
||||
move(destPos.x() - width() / 2, destPos.y() - height() / 2);
|
||||
} else {
|
||||
move(destPos.x(), destPos.y()); // 窗口特效未开启时会隐藏m_object绘制的图标,移动的图标为QDrag绘制的图标
|
||||
}
|
||||
move(destPos.x() - width() / 2, destPos.y() - height() / 2);
|
||||
}
|
||||
|
||||
void AppDragWidget::enterEvent(QEvent *event)
|
||||
|
Loading…
x
Reference in New Issue
Block a user