mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix popup preview window position error
Change-Id: I2770084ff8fb1f454b84722658a63c9e7f3f4eb0
This commit is contained in:
parent
061ca2e900
commit
756f9ede9e
Notes:
Deepin Code Review
2017-06-30 13:53:19 +08:00
Verified+1: Anonymous Coward #1000004 Code-Review+2: 石博文 <sbw@sbw.so> Submitted-by: 石博文 <sbw@sbw.so> Submitted-at: Fri, 30 Jun 2017 13:53:17 +0800 Reviewed-on: https://cr.deepin.io/24178 Project: dde/dde-dock Branch: refs/heads/master
@ -207,9 +207,8 @@ void DockItem::showPopupWindow(QWidget * const content, const bool model)
|
||||
case Left: popup->setArrowDirection(DockPopupWindow::ArrowLeft); break;
|
||||
case Right: popup->setArrowDirection(DockPopupWindow::ArrowRight); break;
|
||||
}
|
||||
popup->resize(content->sizeHint());
|
||||
popup->setContent(content);
|
||||
popup->setWidth(content->sizeHint().width());
|
||||
popup->setHeight(content->sizeHint().height());
|
||||
|
||||
const QPoint p = popupMarkPoint();
|
||||
if (!popup->isVisible())
|
||||
@ -217,7 +216,7 @@ void DockItem::showPopupWindow(QWidget * const content, const bool model)
|
||||
else
|
||||
popup->show(p, model);
|
||||
|
||||
connect(popup, &DockPopupWindow::accept, this, &DockItem::popupWindowAccept);
|
||||
connect(popup, &DockPopupWindow::accept, this, &DockItem::popupWindowAccept, Qt::UniqueConnection);
|
||||
}
|
||||
|
||||
void DockItem::popupWindowAccept()
|
||||
|
@ -70,14 +70,9 @@ void DockPopupWindow::show(const QPoint &pos, const bool model)
|
||||
|
||||
void DockPopupWindow::show(const int x, const int y)
|
||||
{
|
||||
resizeWithContent();
|
||||
|
||||
m_lastPoint = QPoint(x, y);
|
||||
move(x, y);
|
||||
if (!isVisible())
|
||||
QWidget::show();
|
||||
|
||||
update();
|
||||
DArrowRectangle::show(x, y);
|
||||
}
|
||||
|
||||
void DockPopupWindow::hide()
|
||||
|
Loading…
x
Reference in New Issue
Block a user