From a1334208d7acce856a22fe594d1162e748ec55aa Mon Sep 17 00:00:00 2001 From: shaojun Date: Thu, 26 Sep 2019 19:08:29 +0800 Subject: [PATCH] fixed(bug:3176):refresh item icon when screen changed. --- frame/util/docksettings.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frame/util/docksettings.cpp b/frame/util/docksettings.cpp index aa6288380..b7bce546f 100644 --- a/frame/util/docksettings.cpp +++ b/frame/util/docksettings.cpp @@ -125,6 +125,7 @@ DockSettings::DockSettings(QWidget *parent) connect(m_displayInter, &DBusDisplay::PrimaryRectChanged, this, &DockSettings::primaryScreenChanged, Qt::QueuedConnection); connect(m_displayInter, &DBusDisplay::ScreenHeightChanged, this, &DockSettings::primaryScreenChanged, Qt::QueuedConnection); connect(m_displayInter, &DBusDisplay::ScreenWidthChanged, this, &DockSettings::primaryScreenChanged, Qt::QueuedConnection); + connect(m_displayInter, &DBusDisplay::PrimaryChanged, this, &DockSettings::primaryScreenChanged, Qt::QueuedConnection); DApplication *app = qobject_cast(qApp); if (app) { @@ -378,6 +379,9 @@ void DockSettings::primaryScreenChanged() updateForbidPostions(); emit dataChanged(); calculateWindowConfig(); + + // 主屏切换时,如果缩放比例不一样,需要刷新item的图标(bug:3176) + m_itemManager->refershItemsIcon(); } void DockSettings::resetFrontendGeometry()