fix: 修复高缩放率下启动器位置显示错误和无法设置智能隐藏的问题

向后端发送任务栏尺寸的时候,无需计算分辨率相关,此处去掉分辨率的设置

Log: 优化高缩放率下任务栏的数据错误
Influence: 前提:屏幕分辨率设置为1.25;1、任务栏设置为智能隐藏,将窗口拖动到任务栏下方,观察任务栏是否隐藏;2、观察启动器的位置是否正确
Bug: https://pms.uniontech.com/bug-view-154513.html
Bug: https://pms.uniontech.com/bug-view-157413.html
Change-Id: Iebd9f31b9207852425d5215bb3b92152ec4ab46c
This commit is contained in:
donghualin 2022-10-26 09:11:56 +00:00
parent c474ae7b23
commit e02ce4f03b
2 changed files with 2 additions and 2 deletions

View File

@ -388,7 +388,7 @@ QRect MainWindowBase::getDockGeometry(QScreen *screen, const Dock::Position &pos
const int margin = static_cast<int>((displaymode == DisplayMode::Fashion ? 10 : 0) * (withoutScale ? qApp->devicePixelRatio() : 1));
int dockSize = 0;
if (hideState == Dock::HideState::Show)
dockSize = windowSize();
dockSize = windowSize() * (withoutScale ? qApp->devicePixelRatio() : 1);
// 拿到当前显示器缩放之前的分辨率
QRect screenRect = screen->handle()->geometry();

View File

@ -601,7 +601,7 @@ void WindowManager::onChangeDockPosition(QString fromScreen, QString toScreen, c
void WindowManager::onRequestUpdateFrontendGeometry()
{
QRect rect = getDockGeometry(false);
QRect rect = getDockGeometry(true);
// 向com.deepin.dde.daemon.Dock的SetFrontendWindowRect接口设置区域时,此区域的高度或宽度不能为0,否则会导致其HideState属性循环切换,造成任务栏循环显示或隐藏
if (rect.width() == 0 || rect.height() == 0)
return;