From 10b36aed8aee140cc7bfa955857dfe7d7f67d4f3 Mon Sep 17 00:00:00 2001 From: Zhang Qipeng Date: Mon, 1 Feb 2021 10:28:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BA=94=E7=94=A8=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=98=BE=E7=A4=BA=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.应用图标状态不对; 2.打开wine应用时显示了几个多余的图标。 Log: 修复任务栏应用图标显示异常的问题。 Bug: https://pms.uniontech.com/zentao/bug-view-61394.html Change-Id: Ib3ad2b4115ce90d58e82809e6075a6e398a6af5a --- frame/item/appitem.cpp | 5 +++++ frame/item/appitem.h | 1 + frame/item/dockitem.h | 1 + frame/panel/mainpanelcontrol.cpp | 1 + 4 files changed, 8 insertions(+) diff --git a/frame/item/appitem.cpp b/frame/item/appitem.cpp index 0ea4e297b..32b930ae4 100644 --- a/frame/item/appitem.cpp +++ b/frame/item/appitem.cpp @@ -141,6 +141,11 @@ AppItem::~AppItem() m_appNameTips->deleteLater(); } +void AppItem::checkEntry() +{ + m_itemEntryInter->Check(); +} + const QString AppItem::appId() const { return m_id; diff --git a/frame/item/appitem.h b/frame/item/appitem.h index 104c11211..bc4422f04 100644 --- a/frame/item/appitem.h +++ b/frame/item/appitem.h @@ -46,6 +46,7 @@ public: explicit AppItem(const QDBusObjectPath &entry, QWidget *parent = nullptr); ~AppItem() override; + void checkEntry() override; const QString appId() const; bool isValid() const; void updateWindowIconGeometries(); diff --git a/frame/item/dockitem.h b/frame/item/dockitem.h index b54410439..a88740776 100644 --- a/frame/item/dockitem.h +++ b/frame/item/dockitem.h @@ -67,6 +67,7 @@ public slots: void showPopupApplet(QWidget *const applet); void hidePopup(); virtual void setDraging(bool bDrag); + virtual void checkEntry() {} bool isDragging(); signals: diff --git a/frame/panel/mainpanelcontrol.cpp b/frame/panel/mainpanelcontrol.cpp index b583b9ce5..5ae240c22 100755 --- a/frame/panel/mainpanelcontrol.cpp +++ b/frame/panel/mainpanelcontrol.cpp @@ -345,6 +345,7 @@ void MainPanelControl::insertItem(int index, DockItem *item) QTimer::singleShot(0, [ = ] { updatePluginsLayout(); }); + item->checkEntry(); } void MainPanelControl::removeItem(DockItem *item)