diff --git a/frame/item/appitem.cpp b/frame/item/appitem.cpp index c1e766586..2f9c48fc6 100644 --- a/frame/item/appitem.cpp +++ b/frame/item/appitem.cpp @@ -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); } diff --git a/frame/item/appitem.h b/frame/item/appitem.h index 1c84de649..9c51a5ccb 100644 --- a/frame/item/appitem.h +++ b/frame/item/appitem.h @@ -47,7 +47,7 @@ private slots: void updateTitle(); void refershIcon(); void activeChanged(); - void togglePreview(); + void showPreview(); private: QLabel *m_appNameTips; diff --git a/frame/item/dockitem.h b/frame/item/dockitem.h index 8084476d9..b2e14fcbf 100644 --- a/frame/item/dockitem.h +++ b/frame/item/dockitem.h @@ -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;