From cefcef3bf696e6ee4967c268933d4743f6dcbf7b Mon Sep 17 00:00:00 2001 From: Fan PengCheng Date: Mon, 17 May 2021 13:20:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=A0=8F=E9=A2=84=E8=A7=88=E6=95=88=E6=9E=9C=E7=A9=BA=E7=99=BD?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当同一个应用打开的窗口过多的时候,预览图会等比缩小,导致看不到 目前这里限制了最大可以打开的数量,按照屏幕宽度除以最大预览图的一半来计算 Log: 修复应用打开窗口过多时任务栏预览效果空白问题 Bug: https://pms.uniontech.com/zentao/bug-view-68118.html Change-Id: Idc0b74d122b63579f3da7806625ee3b8312e0109 --- frame/item/components/previewcontainer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frame/item/components/previewcontainer.cpp b/frame/item/components/previewcontainer.cpp index eba32688e..e633be4e0 100644 --- a/frame/item/components/previewcontainer.cpp +++ b/frame/item/components/previewcontainer.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #define SPACING 0 #define MARGIN 0 @@ -194,6 +195,8 @@ void PreviewContainer::appendSnapWidget(const WId wid) }); m_windowListLayout->addWidget(snap); + if (m_snapshots.size() >= (QDesktopWidget().screenGeometry(this).width() / (SNAP_WIDTH / 2))) + snap->setVisible(false); m_snapshots.insert(wid, snap);