From 4aa44632af4bdad142197c631a9aa6d7c7b84ee0 Mon Sep 17 00:00:00 2001 From: fanpengcheng Date: Tue, 18 Jan 2022 09:46:45 +0800 Subject: [PATCH] fix: fix struct area error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复时尚模式任务栏边距错误的问题 Log: 修复时尚模式任务栏边距错误的问题 Influence: 时尚模式,任务栏边距 Task: https://pms.uniontech.com/zentao/task-view-98205.html Change-Id: I8361e99647b1682e1bd9aacdf12021fea7eca8ab --- frame/util/multiscreenworker.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/frame/util/multiscreenworker.cpp b/frame/util/multiscreenworker.cpp index de4462314..6e420e4a0 100644 --- a/frame/util/multiscreenworker.cpp +++ b/frame/util/multiscreenworker.cpp @@ -754,31 +754,29 @@ void MultiScreenWorker::onRequestNotifyWindowManager() const qreal &ratio = qApp->devicePixelRatio(); if (Utils::IS_WAYLAND_DISPLAY) { - // TODO 下面可能是问题的代码 - // TODO 未计算时尚模式的边距 QList varList = {0, 0, 0, 0}; switch (m_position) { case Position::Top: varList[0] = 1; - varList[1] = dockGeometry.height() * ratio; + varList[1] = (dockGeometry.height() + WINDOWMARGIN * 2) * ratio; varList[2] = dockGeometry.x() * ratio; varList[3] = (dockGeometry.x() + dockGeometry.width()) * ratio; break; case Position::Bottom: varList[0] = 3; - varList[1] = dockGeometry.height() * ratio; + varList[1] = (dockGeometry.height() + WINDOWMARGIN * 2) * ratio; varList[2] = dockGeometry.x() * ratio; varList[3] = (dockGeometry.x() + dockGeometry.width()) * ratio; break; case Position::Left: varList[0] = 0; - varList[1] = dockGeometry.width() * ratio; + varList[1] = (dockGeometry.width() + WINDOWMARGIN * 2) * ratio; varList[2] = dockGeometry.x() * ratio; varList[3] = dockGeometry.height() * ratio; break; case Position::Right: varList[0] = 2; - varList[1] = dockGeometry.width() * ratio; + varList[1] = (dockGeometry.width() + WINDOWMARGIN * 2) * ratio; varList[2] = dockGeometry.x() * ratio; varList[3] = dockGeometry.height() * ratio; break;