mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +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);
|
// showPopupWindow(content);
|
||||||
|
|
||||||
const int count = m_titles.size();
|
if (m_titles.isEmpty())
|
||||||
if (count <= 1)
|
|
||||||
return DockItem::showHoverTips();
|
return DockItem::showHoverTips();
|
||||||
|
|
||||||
togglePreview();
|
showPreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppItem::invokedMenuItem(const QString &itemId, const bool checked)
|
void AppItem::invokedMenuItem(const QString &itemId, const bool checked)
|
||||||
@ -447,15 +446,15 @@ void AppItem::activeChanged()
|
|||||||
m_active = !m_active;
|
m_active = !m_active;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppItem::togglePreview()
|
void AppItem::showPreview()
|
||||||
{
|
{
|
||||||
if (PopupWindow->isVisible())
|
// if (PopupWindow->isVisible())
|
||||||
return hidePopup();
|
// return hidePopup();
|
||||||
|
|
||||||
m_appPreviewTips->updateLayoutDirection(DockPosition);
|
m_appPreviewTips->updateLayoutDirection(DockPosition);
|
||||||
m_appPreviewTips->setWindowInfos(m_titles);
|
m_appPreviewTips->setWindowInfos(m_titles);
|
||||||
|
|
||||||
qApp->processEvents();
|
qApp->processEvents();
|
||||||
|
|
||||||
showPopupApplet(m_appPreviewTips);
|
showPopupWindow(m_appPreviewTips, true);
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ private slots:
|
|||||||
void updateTitle();
|
void updateTitle();
|
||||||
void refershIcon();
|
void refershIcon();
|
||||||
void activeChanged();
|
void activeChanged();
|
||||||
void togglePreview();
|
void showPreview();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QLabel *m_appNameTips;
|
QLabel *m_appNameTips;
|
||||||
|
@ -56,6 +56,7 @@ protected:
|
|||||||
void hidePopup();
|
void hidePopup();
|
||||||
void popupWindowAccept();
|
void popupWindowAccept();
|
||||||
void showPopupApplet(QWidget * const applet);
|
void showPopupApplet(QWidget * const applet);
|
||||||
|
void showPopupWindow(QWidget * const content, const bool model = false);
|
||||||
virtual void showHoverTips();
|
virtual void showHoverTips();
|
||||||
virtual void invokedMenuItem(const QString &itemId, const bool checked);
|
virtual void invokedMenuItem(const QString &itemId, const bool checked);
|
||||||
virtual const QString contextMenu() const;
|
virtual const QString contextMenu() const;
|
||||||
@ -66,7 +67,6 @@ protected slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void updatePopupPosition();
|
void updatePopupPosition();
|
||||||
void showPopupWindow(QWidget * const content, const bool model = false);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool m_hover;
|
bool m_hover;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user