mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
fix popup menu at efficient mode
Change-Id: Ic1f80eaa718915d9b7112e826a111648fe198cba
This commit is contained in:
parent
42831a2c94
commit
5d7e6c8866
Notes:
Deepin Code Review
2016-08-04 09:08:24 +00:00
Verified+1: Anonymous Coward #1000004 Code-Review+2: 石博文 <sbw@sbw.so> Submitted-by: 石博文 <sbw@sbw.so> Submitted-at: Thu, 04 Aug 2016 09:08:23 +0000 Reviewed-on: https://cr.deepin.io/14918 Project: dde/dde-dock Branch: refs/heads/master
@ -74,7 +74,9 @@ void TrayWidget::paintEvent(QPaintEvent *e)
|
||||
|
||||
void TrayWidget::mousePressEvent(QMouseEvent *e)
|
||||
{
|
||||
QWidget::mousePressEvent(e);
|
||||
const QPoint point(e->pos() - rect().center());
|
||||
if (point.manhattanLength() > 24)
|
||||
return QWidget::mousePressEvent(e);
|
||||
|
||||
m_pressPoint = e->pos();
|
||||
}
|
||||
@ -83,6 +85,10 @@ void TrayWidget::mouseReleaseEvent(QMouseEvent *e)
|
||||
{
|
||||
QWidget::mouseReleaseEvent(e);
|
||||
|
||||
const QPoint point(e->pos() - rect().center());
|
||||
if (point.manhattanLength() > 24)
|
||||
return;
|
||||
|
||||
const QPoint distance = e->pos() - m_pressPoint;
|
||||
if (distance.manhattanLength() > DRAG_THRESHOLD)
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user