mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
improve popup applet hide behavior
Change-Id: Icf1f738ca567f19bede58d90061c78a4bc924cc2
This commit is contained in:
parent
202f1a1ab0
commit
cdfe2d48f3
Notes:
Deepin Code Review
2017-12-26 10:41:13 +08:00
Verified+1: Anonymous Coward #1000004 Code-Review+2: 石博文 <sbw@sbw.so> Submitted-by: 石博文 <sbw@sbw.so> Submitted-at: Tue, 26 Dec 2017 10:41:12 +0800 Reviewed-on: https://cr.deepin.io/29622 Project: dde/dde-dock Branch: refs/heads/master
@ -112,8 +112,8 @@ void PluginsItem::refershIcon()
|
||||
|
||||
void PluginsItem::mousePressEvent(QMouseEvent *e)
|
||||
{
|
||||
if (!isInContainer() && !PopupWindow->isModal() && PopupWindow->isVisible())
|
||||
hidePopup();
|
||||
if (!isInContainer() && PopupWindow->isVisible())
|
||||
hideNonModel();
|
||||
|
||||
if (e->button() == Qt::LeftButton)
|
||||
MousePressPoint = e->pos();
|
||||
|
@ -49,7 +49,7 @@ DockPopupWindow::DockPopupWindow(QWidget *parent)
|
||||
|
||||
connect(m_acceptDelayTimer, &QTimer::timeout, this, &DockPopupWindow::accept);
|
||||
connect(m_wmHelper, &DWindowManagerHelper::hasCompositeChanged, this, &DockPopupWindow::compositeChanged);
|
||||
connect(m_regionInter, &DRegionMonitor::buttonPress, this, &DockPopupWindow::onGlobMouseRelease);
|
||||
connect(m_regionInter, &DRegionMonitor::buttonRelease, this, &DockPopupWindow::onGlobMouseRelease);
|
||||
}
|
||||
|
||||
DockPopupWindow::~DockPopupWindow()
|
||||
|
@ -129,7 +129,7 @@ void WirelessItem::resizeEvent(QResizeEvent *e)
|
||||
void WirelessItem::mousePressEvent(QMouseEvent *e)
|
||||
{
|
||||
if (e->button() != Qt::RightButton)
|
||||
return QWidget::mousePressEvent(e);
|
||||
return e->ignore();
|
||||
|
||||
const QPoint p(e->pos() - rect().center());
|
||||
if (p.manhattanLength() < std::min(width(), height()) * 0.8 * 0.5)
|
||||
|
Loading…
x
Reference in New Issue
Block a user