mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
hide preview when mouse leave item
Change-Id: Ic9f8ed4d9fcd04200ad5a22dc71658e767d712b6
This commit is contained in:
parent
8ccbdcca89
commit
984a269d48
Notes:
Deepin Code Review
2017-08-21 09:21:49 +08:00
Verified+1: Anonymous Coward #1000004 Code-Review+2: 石博文 <sbw@sbw.so> Submitted-by: 石博文 <sbw@sbw.so> Submitted-at: Mon, 21 Aug 2017 09:21:46 +0800 Reviewed-on: https://cr.deepin.io/25598 Project: dde/dde-dock Branch: refs/heads/master
@ -408,6 +408,14 @@ void AppItem::dropEvent(QDropEvent *e)
|
|||||||
m_itemEntry->HandleDragDrop(uriList);
|
m_itemEntry->HandleDragDrop(uriList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AppItem::leaveEvent(QEvent *e)
|
||||||
|
{
|
||||||
|
DockItem::leaveEvent(e);
|
||||||
|
|
||||||
|
if (m_appPreviewTips->isVisible())
|
||||||
|
m_appPreviewTips->prepareHide();
|
||||||
|
}
|
||||||
|
|
||||||
void AppItem::showHoverTips()
|
void AppItem::showHoverTips()
|
||||||
{
|
{
|
||||||
if (!m_titles.isEmpty())
|
if (!m_titles.isEmpty())
|
||||||
|
@ -42,6 +42,7 @@ private:
|
|||||||
void dragEnterEvent(QDragEnterEvent *e);
|
void dragEnterEvent(QDragEnterEvent *e);
|
||||||
void dragMoveEvent(QDragMoveEvent *e);
|
void dragMoveEvent(QDragMoveEvent *e);
|
||||||
void dropEvent(QDropEvent *e);
|
void dropEvent(QDropEvent *e);
|
||||||
|
void leaveEvent(QEvent *e);
|
||||||
|
|
||||||
void showHoverTips();
|
void showHoverTips();
|
||||||
void invokedMenuItem(const QString &itemId, const bool checked);
|
void invokedMenuItem(const QString &itemId, const bool checked);
|
||||||
|
@ -103,6 +103,11 @@ void PreviewContainer::checkMouseLeave()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PreviewContainer::prepareHide()
|
||||||
|
{
|
||||||
|
m_mouseLeaveTimer->start();
|
||||||
|
}
|
||||||
|
|
||||||
void PreviewContainer::adjustSize()
|
void PreviewContainer::adjustSize()
|
||||||
{
|
{
|
||||||
const int count = m_snapshots.size();
|
const int count = m_snapshots.size();
|
||||||
|
@ -38,6 +38,7 @@ public:
|
|||||||
public slots:
|
public slots:
|
||||||
void updateLayoutDirection(const Dock::Position dockPos);
|
void updateLayoutDirection(const Dock::Position dockPos);
|
||||||
void checkMouseLeave();
|
void checkMouseLeave();
|
||||||
|
void prepareHide();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void adjustSize();
|
void adjustSize();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user