fix: tips color error under 2D

Change-Id: I852bb059a551b28e7d99c1e4690d7ee25f6cfd3f
This commit is contained in:
haruyukilxz 2018-09-07 11:16:40 +08:00
parent f17cce91d6
commit 009c03c9fe
No known key found for this signature in database
GPG Key ID: 593AFD577C1B1A60
Notes: gerrit 2018-09-07 14:18:29 +08:00
Verified+1: <jenkins@deepin.com>
Verified+1: mmxzmmxz <wangyanli@linuxdeepin.com>
Code-Review+2: 张丁元 <lxz@ilxz.me>
Submitted-by: 张丁元 <lxz@ilxz.me>
Submitted-at: Fri, 07 Sep 2018 14:18:28 +0800
Reviewed-on: https://cr.deepin.io/38274
Project: dde/dde-dock
Branch: refs/heads/master
2 changed files with 7 additions and 3 deletions

View File

@ -55,7 +55,7 @@ AppSnapshot::AppSnapshot(const WId wid, QWidget *parent)
m_wid(wid),
m_title(new QLabel),
m_title(new TipsWidget),
m_closeBtn(new DImageButton),
m_wmHelper(DWindowManagerHelper::instance())
@ -202,6 +202,8 @@ void AppSnapshot::enterEvent(QEvent *e)
m_closeBtn->setVisible(true);
else
emit entered(m_wid);
update();
}
void AppSnapshot::leaveEvent(QEvent *e)
@ -209,6 +211,8 @@ void AppSnapshot::leaveEvent(QEvent *e)
QWidget::leaveEvent(e);
m_closeBtn->setVisible(false);
update();
}
void AppSnapshot::paintEvent(QPaintEvent *e)

View File

@ -25,7 +25,7 @@
#include <QWidget>
#include <QDebug>
#include <QTimer>
#include <QLabel>
#include "../widgets/tipswidget.h"
#include <dimagebutton.h>
#include <DWindowManagerHelper>
@ -83,7 +83,7 @@ private:
QImage m_snapshot;
QRectF m_snapshotSrcRect;
QLabel *m_title;
TipsWidget *m_title;
DImageButton *m_closeBtn;
DWindowManagerHelper *m_wmHelper;