mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
Fix app window snapshot size error
Change-Id: I2a576454562536808fcf1b788a5cebf151a986d0
This commit is contained in:
parent
b57f8f8328
commit
67b7ef44f5
Notes:
Deepin Code Review
2018-02-23 11:38:19 +08:00
Verified+1: Anonymous Coward #1000004 Code-Review+2: 石博文 <sbw@sbw.so> Submitted-by: 石博文 <sbw@sbw.so> Submitted-at: Fri, 23 Feb 2018 11:38:18 +0800 Reviewed-on: https://cr.deepin.io/31816 Project: dde/dde-dock Branch: refs/heads/master
@ -616,11 +616,11 @@ void AppItem::showPreview()
|
||||
// default: return;
|
||||
// }
|
||||
|
||||
showPopupWindow(m_appPreviewTips, true);
|
||||
|
||||
m_appPreviewTips->setWindowInfos(m_windowInfos);
|
||||
m_appPreviewTips->updateSnapshots();
|
||||
m_appPreviewTips->updateLayoutDirection(DockPosition);
|
||||
|
||||
showPopupWindow(m_appPreviewTips, true);
|
||||
}
|
||||
|
||||
void AppItem::cancelAndHidePreview()
|
||||
|
@ -87,6 +87,8 @@ void AppSnapshot::compositeChanged() const
|
||||
const bool composite = m_wmHelper->hasComposite();
|
||||
|
||||
m_title->setVisible(!composite);
|
||||
|
||||
QTimer::singleShot(1, this, &AppSnapshot::fetchSnapshot);
|
||||
}
|
||||
|
||||
void AppSnapshot::setWindowInfo(const WindowInfo &info)
|
||||
@ -214,6 +216,13 @@ void AppSnapshot::paintEvent(QPaintEvent *e)
|
||||
painter.drawImage(offset_x, offset_y, im);
|
||||
}
|
||||
|
||||
void AppSnapshot::resizeEvent(QResizeEvent *e)
|
||||
{
|
||||
QWidget::resizeEvent(e);
|
||||
|
||||
QTimer::singleShot(1, this, &AppSnapshot::fetchSnapshot);
|
||||
}
|
||||
|
||||
void AppSnapshot::mousePressEvent(QMouseEvent *e)
|
||||
{
|
||||
QWidget::mousePressEvent(e);
|
||||
|
@ -65,6 +65,7 @@ private:
|
||||
void enterEvent(QEvent *e);
|
||||
void leaveEvent(QEvent *e);
|
||||
void paintEvent(QPaintEvent *e);
|
||||
void resizeEvent(QResizeEvent *e);
|
||||
void mousePressEvent(QMouseEvent *e);
|
||||
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user