mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
fix: 修复任务栏预览效果空白问题
当同一个应用打开的窗口过多的时候,预览图会等比缩小,导致看不到 目前这里限制了最大可以打开的数量,按照屏幕宽度除以最大预览图的一半来计算 Log: 修复应用打开窗口过多时任务栏预览效果空白问题 Bug: https://pms.uniontech.com/zentao/bug-view-68118.html Change-Id: Idc0b74d122b63579f3da7806625ee3b8312e0109
This commit is contained in:
parent
bea20335f4
commit
cefcef3bf6
@ -25,6 +25,7 @@
|
||||
#include <QScreen>
|
||||
#include <QApplication>
|
||||
#include <QDragEnterEvent>
|
||||
#include <QDesktopWidget>
|
||||
|
||||
#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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user