mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix close icon disappear
Change-Id: I29366a69811b4cd269e473f480ea74887969a7dc
This commit is contained in:
parent
35c8ad7215
commit
de9d69db1f
Notes:
Deepin Code Review
2017-12-28 17:05:06 +08:00
Verified+1: Anonymous Coward #1000004 Code-Review+2: 石博文 <sbw@sbw.so> Submitted-by: 石博文 <sbw@sbw.so> Submitted-at: Thu, 28 Dec 2017 17:05:05 +0800 Reviewed-on: https://cr.deepin.io/29813 Project: dde/dde-dock Branch: refs/heads/master
@ -42,9 +42,9 @@ AppSnapshot::AppSnapshot(const WId wid, QWidget *parent)
|
|||||||
m_wmHelper(DWindowManagerHelper::instance())
|
m_wmHelper(DWindowManagerHelper::instance())
|
||||||
{
|
{
|
||||||
m_closeBtn->setFixedSize(24, 24);
|
m_closeBtn->setFixedSize(24, 24);
|
||||||
m_closeBtn->setNormalPic(":/icons/resources/close_round_normal.png");
|
m_closeBtn->setNormalPic(":/icons/resources/close_round_normal.svg");
|
||||||
m_closeBtn->setHoverPic(":/icons/resources/close_round_hover.png");
|
m_closeBtn->setHoverPic(":/icons/resources/close_round_hover.svg");
|
||||||
m_closeBtn->setPressPic(":/icons/resources/close_round_press.png");
|
m_closeBtn->setPressPic(":/icons/resources/close_round_press.svg");
|
||||||
m_closeBtn->setVisible(false);
|
m_closeBtn->setVisible(false);
|
||||||
|
|
||||||
QHBoxLayout *centralLayout = new QHBoxLayout;
|
QHBoxLayout *centralLayout = new QHBoxLayout;
|
||||||
@ -55,7 +55,7 @@ AppSnapshot::AppSnapshot(const WId wid, QWidget *parent)
|
|||||||
|
|
||||||
setLayout(centralLayout);
|
setLayout(centralLayout);
|
||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
setFixedSize(SNAP_WIDTH, SNAP_HEIGHT);
|
resize(SNAP_WIDTH, SNAP_HEIGHT);
|
||||||
|
|
||||||
connect(m_closeBtn, &DImageButton::clicked, this, &AppSnapshot::closeWindow, Qt::QueuedConnection);
|
connect(m_closeBtn, &DImageButton::clicked, this, &AppSnapshot::closeWindow, Qt::QueuedConnection);
|
||||||
connect(m_wmHelper, &DWindowManagerHelper::hasCompositeChanged, this, &AppSnapshot::compositeChanged, Qt::QueuedConnection);
|
connect(m_wmHelper, &DWindowManagerHelper::hasCompositeChanged, this, &AppSnapshot::compositeChanged, Qt::QueuedConnection);
|
||||||
|
@ -76,7 +76,7 @@ void FloatingPreview::paintEvent(QPaintEvent *e)
|
|||||||
if (m_tracked.isNull())
|
if (m_tracked.isNull())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const QImage snapshot = m_tracked->snapshot();
|
const QImage &snapshot = m_tracked->snapshot();
|
||||||
if (snapshot.isNull())
|
if (snapshot.isNull())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -79,7 +79,8 @@ void PreviewContainer::setWindowInfos(const WindowDict &infos)
|
|||||||
|
|
||||||
if (m_snapshots.isEmpty())
|
if (m_snapshots.isEmpty())
|
||||||
emit requestCancelAndHidePreview();
|
emit requestCancelAndHidePreview();
|
||||||
adjustSize();
|
|
||||||
|
adjustSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreviewContainer::updateSnapshots()
|
void PreviewContainer::updateSnapshots()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user