mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-02 15:45:21 +00:00
fix: 修改wayland下任务栏高效模式下的高度计算方法
wayland下任务栏高度计算有些误差,导致改变任务栏位置之后,应用窗口最大化和分屏之后与之间任务栏有间隙 Log: 修复wayland下窗口顶端与任务栏有间距的问题 Bug: https://pms.uniontech.com/bug-view-113189.html Influence: wayland任务栏与应用窗口之间的间距 Change-Id: I80d71eb2caf891c5b519ded3d6fd3578054716f5
This commit is contained in:
parent
218539e321
commit
271509d623
@ -758,27 +758,27 @@ void MultiScreenWorker::onRequestNotifyWindowManager()
|
||||
switch (m_position) {
|
||||
case Position::Top:
|
||||
varList[0] = 1;
|
||||
varList[1] = (dockGeometry.height() + WINDOWMARGIN * 2) * ratio;
|
||||
varList[2] = dockGeometry.x() * ratio;
|
||||
varList[3] = (dockGeometry.x() + dockGeometry.width()) * ratio;
|
||||
varList[1] = dockGeometry.y() + dockGeometry.height() + WINDOWMARGIN * ratio;
|
||||
varList[2] = dockGeometry.x();
|
||||
varList[3] = dockGeometry.x() + dockGeometry.width();
|
||||
break;
|
||||
case Position::Bottom:
|
||||
varList[0] = 3;
|
||||
varList[1] = (dockGeometry.height() + WINDOWMARGIN * 2) * ratio;
|
||||
varList[2] = dockGeometry.x() * ratio;
|
||||
varList[3] = (dockGeometry.x() + dockGeometry.width()) * ratio;
|
||||
varList[1] = DIS_INS->screenRawHeight() - dockGeometry.y() + WINDOWMARGIN * ratio;
|
||||
varList[2] = dockGeometry.x();
|
||||
varList[3] = dockGeometry.x() + dockGeometry.width();
|
||||
break;
|
||||
case Position::Left:
|
||||
varList[0] = 0;
|
||||
varList[1] = (dockGeometry.width() + WINDOWMARGIN * 2) * ratio;
|
||||
varList[2] = dockGeometry.x() * ratio;
|
||||
varList[3] = dockGeometry.height() * ratio;
|
||||
varList[1] = dockGeometry.x() + dockGeometry.width() + WINDOWMARGIN * ratio;
|
||||
varList[2] = dockGeometry.y();
|
||||
varList[3] = dockGeometry.y() + dockGeometry.height();
|
||||
break;
|
||||
case Position::Right:
|
||||
varList[0] = 2;
|
||||
varList[1] = (dockGeometry.width() + WINDOWMARGIN * 2) * ratio;
|
||||
varList[2] = dockGeometry.x() * ratio;
|
||||
varList[3] = dockGeometry.height() * ratio;
|
||||
varList[1] = DIS_INS->screenRawWidth() - dockGeometry.x() + WINDOWMARGIN * ratio;
|
||||
varList[2] = dockGeometry.y();
|
||||
varList[3] = dockGeometry.y() + dockGeometry.height();
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user