Update preview's show position

Change-Id: Ica86ba0fc416f9bcab96f18e4d4cad1d86dbda66
This commit is contained in:
杨万青 2015-09-24 19:37:34 +08:00 committed by yangwanqing
parent d558c5ef74
commit d8cb8bf3cf
Notes: Deepin Code Review 2016-06-14 07:19:47 +00:00
Code-Review+2: <mr.asianwang@gmail.com>
Verified+1: <mr.asianwang@gmail.com>
Submitted-by: <mr.asianwang@gmail.com>
Submitted-at: Fri, 25 Sep 2015 10:54:44 +0800
Reviewed-on: https://cr.deepin.io/7366
Project: dde/dde-dock
Branch: refs/heads/master
2 changed files with 4 additions and 2 deletions

View File

@ -333,7 +333,9 @@ void Panel::onNeedPreviewShow(QPoint pos)
if (item && item->getApplet()) {
m_globalPreview->setArrowX(-1);//reset x to move arrow to horizontal-center
m_globalPreview->setContent(item->getApplet());
m_globalPreview->showPreview(pos.x(), pos.y() + 10, DELAY_SHOW_PREVIEW_INTERVAL);
m_globalPreview->showPreview(pos.x(),
pos.y() + m_globalPreview->shadowBlurRadius() + m_globalPreview->shadowDistance(),
DELAY_SHOW_PREVIEW_INTERVAL);
}
}

View File

@ -140,7 +140,7 @@ void AbstractDockItem::showPreview()
m_titlePreview->setArrowX(-1); //reset position
m_titlePreview->setContent(m_titleLabel);
m_titlePreview->showPreview(globalX() + width() / 2,
globalY() + 18,
globalY() + m_titlePreview->shadowBlurRadius() + m_titlePreview->shadowDistance(),
0);
}
}