mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix: triple dock size drag to remove distance
Change-Id: Icbc5d642afcf78a93c1e93c47338b48da76f81e1
This commit is contained in:
parent
95b5c72f13
commit
87e6d18aaf
Notes:
gerrit
2018-08-06 15:46:46 +08:00
Verified+1: <jenkins@deepin.com> Code-Review+2: 张丁元 <lxz@ilxz.me> Submitted-by: listenerri <listenerri@gmail.com> Submitted-at: Mon, 06 Aug 2018 15:46:46 +0800 Reviewed-on: https://cr.deepin.io/37412 Project: dde/dde-dock Branch: refs/heads/master
@ -187,22 +187,22 @@ bool AppDragWidget::isRemoveAble()
|
|||||||
const QPoint &p = QCursor::pos();
|
const QPoint &p = QCursor::pos();
|
||||||
switch (m_dockPosition) {
|
switch (m_dockPosition) {
|
||||||
case Dock::Position::Left:
|
case Dock::Position::Left:
|
||||||
if ((p.x() - m_dockGeometry.topRight().x()) > 100) {
|
if ((p.x() - m_dockGeometry.topRight().x()) > (m_dockGeometry.width() * 3)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Dock::Position::Top:
|
case Dock::Position::Top:
|
||||||
if ((p.y() - m_dockGeometry.bottomLeft().y()) > 100) {
|
if ((p.y() - m_dockGeometry.bottomLeft().y()) > (m_dockGeometry.height() * 3)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Dock::Position::Right:
|
case Dock::Position::Right:
|
||||||
if ((m_dockGeometry.topLeft().x() - p.x()) > 100) {
|
if ((m_dockGeometry.topLeft().x() - p.x()) > (m_dockGeometry.width() * 3)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Dock::Position::Bottom:
|
case Dock::Position::Bottom:
|
||||||
if ((m_dockGeometry.topLeft().y() - p.y()) > 100) {
|
if ((m_dockGeometry.topLeft().y() - p.y()) > (m_dockGeometry.height() * 3)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user