From b6718bfd2d1455493a0fdbbfe977337bd013a9a1 Mon Sep 17 00:00:00 2001 From: chenjun Date: Fri, 18 Dec 2020 16:18:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9C=A8=E9=A2=84=E8=A7=88=E5=89=8D?= =?UTF-8?q?=E5=85=88=E5=88=9D=E5=A7=8B=E5=8C=96=E9=A2=84=E8=A7=88=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E7=9A=84=E8=BE=B9=E8=B7=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在打开特效时,如果鼠标快速进入并退出预览窗口,此时在进入时会设置预览窗口的边距,退出没有重置边距,然后在关闭特效后,再次预览时,窗口标题会出现偏 移问题,在开始预览时全部重置下预览界面的边距 Log: 修复无窗口特效下,多个窗口任务栏预览,概率性显示错位问题 Bug: https://pms.uniontech.com/zentao/bug-view-57974.html Change-Id: I1e403dfb9262ec6c290468df49d4dfc6bcb827f5 --- 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 d29f01126..e4d6166ed 100644 --- a/frame/item/components/previewcontainer.cpp +++ b/frame/item/components/previewcontainer.cpp @@ -64,6 +64,9 @@ void PreviewContainer::setWindowInfos(const WindowInfoMap &infos, const WindowLi // check removed window for (auto it(m_snapshots.begin()); it != m_snapshots.end();) { + //初始化预览界面边距 + it.value()->setContentsMargins(0, 0, 0, 0); + if (!infos.contains(it.key())) { m_windowListLayout->removeWidget(it.value());