mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
always show preview window
show preview window whatever is single window or not Change-Id: Ia30661696f2eb80a9ee1ae0bb693715686a8904b
This commit is contained in:
parent
719ba37e5c
commit
ea1b02646d
Notes:
Deepin Code Review
2017-04-25 16:38:16 +08:00
Code-Review+2: 石博文 <sbw@sbw.so> Verified+1: 石博文 <sbw@sbw.so> Submitted-by: 石博文 <sbw@sbw.so> Submitted-at: Tue, 25 Apr 2017 16:38:14 +0800 Reviewed-on: https://cr.deepin.io/22532 Project: dde/dde-dock Branch: refs/heads/master
@ -357,11 +357,10 @@ void AppItem::showHoverTips()
|
||||
|
||||
// showPopupWindow(content);
|
||||
|
||||
const int count = m_titles.size();
|
||||
if (count <= 1)
|
||||
if (m_titles.isEmpty())
|
||||
return DockItem::showHoverTips();
|
||||
|
||||
togglePreview();
|
||||
showPreview();
|
||||
}
|
||||
|
||||
void AppItem::invokedMenuItem(const QString &itemId, const bool checked)
|
||||
@ -447,15 +446,15 @@ void AppItem::activeChanged()
|
||||
m_active = !m_active;
|
||||
}
|
||||
|
||||
void AppItem::togglePreview()
|
||||
void AppItem::showPreview()
|
||||
{
|
||||
if (PopupWindow->isVisible())
|
||||
return hidePopup();
|
||||
// if (PopupWindow->isVisible())
|
||||
// return hidePopup();
|
||||
|
||||
m_appPreviewTips->updateLayoutDirection(DockPosition);
|
||||
m_appPreviewTips->setWindowInfos(m_titles);
|
||||
|
||||
qApp->processEvents();
|
||||
|
||||
showPopupApplet(m_appPreviewTips);
|
||||
showPopupWindow(m_appPreviewTips, true);
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ private slots:
|
||||
void updateTitle();
|
||||
void refershIcon();
|
||||
void activeChanged();
|
||||
void togglePreview();
|
||||
void showPreview();
|
||||
|
||||
private:
|
||||
QLabel *m_appNameTips;
|
||||
|
@ -56,6 +56,7 @@ protected:
|
||||
void hidePopup();
|
||||
void popupWindowAccept();
|
||||
void showPopupApplet(QWidget * const applet);
|
||||
void showPopupWindow(QWidget * const content, const bool model = false);
|
||||
virtual void showHoverTips();
|
||||
virtual void invokedMenuItem(const QString &itemId, const bool checked);
|
||||
virtual const QString contextMenu() const;
|
||||
@ -66,7 +67,6 @@ protected slots:
|
||||
|
||||
private:
|
||||
void updatePopupPosition();
|
||||
void showPopupWindow(QWidget * const content, const bool model = false);
|
||||
|
||||
protected:
|
||||
bool m_hover;
|
||||
|
Loading…
x
Reference in New Issue
Block a user