Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions panels/dock/taskmanager/x11preview.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -386,10 +386,10 @@ X11WindowPreviewContainer::X11WindowPreviewContainer(X11WindowMonitor *monitor,
m_monitor->previewWindow(enter.data(TaskManager::WinIdRole).toInt());
}

// 获取图标,优先使用窗口图标,如果为空则使用应用图标
QVariant iconData = enter.data(TaskManager::WinIconRole);
// 获取图标,优先使用主题图标(会跟随主题变化),如果为空则使用窗口图标
QVariant iconData = enter.data(TaskManager::IconNameRole);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里是应用图标,而不是窗口图标,跟之前的注释完全不同,现在改成优先使用应用图标,这不正常吧?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已确认,该bug已经在linuxdeepin/qt5integration@f12a2f106ef56c6300f303e5d7c20918066ee3c3得到修复。
目前这个bug只在玲珑应用中出现(例如editor,movie,album),不过music没有这个问题。如果需要的话,可以换成deb包体。

if (iconData.toString().isEmpty()) {
iconData = enter.data(TaskManager::IconNameRole);
iconData = enter.data(TaskManager::WinIconRole);
}
updatePreviewIconFromString(iconData.toString());
updatePreviewTitle(enter.data(TaskManager::WinTitleRole).toString());
Expand Down Expand Up @@ -458,10 +458,10 @@ void X11WindowPreviewContainer::showPreviewWithModel(QAbstractItemModel *sourceM

if (sourceModel && sourceModel->rowCount() > 0) {
const QModelIndex &firstIndex = sourceModel->index(0, 0);
// 获取图标,优先使用窗口图标,如果为空则使用应用图标
QVariant iconData = firstIndex.data(TaskManager::WinIconRole);
// 获取图标,优先使用主题图标(会跟随主题变化),如果为空则使用窗口图标
QVariant iconData = firstIndex.data(TaskManager::IconNameRole);
if (iconData.toString().isEmpty()) {
iconData = firstIndex.data(TaskManager::IconNameRole);
iconData = firstIndex.data(TaskManager::WinIconRole);
}
updatePreviewIconFromString(iconData.toString());
updatePreviewTitle(firstIndex.data(TaskManager::WinTitleRole).toString());
Expand Down