QRect::right() + 1 == QRect::x() + QRect::width()
Also to catch inner split for sure the calculation needs to be accurate. BUG: 279774 REVIEW: 102292 (cherry picked from commit 561dac0ae1bd158563e4aa6d0f25268fbc5a97af)
This commit is contained in:
parent
e35d0e4aad
commit
8b75f4b321
1 changed files with 4 additions and 4 deletions
|
@ -3074,13 +3074,13 @@ QRect Client::electricBorderMaximizeGeometry(QPoint pos, int desktop)
|
||||||
|
|
||||||
QRect ret = workspace()->clientArea(MaximizeArea, pos, desktop);
|
QRect ret = workspace()->clientArea(MaximizeArea, pos, desktop);
|
||||||
if (electricMode & QuickTileLeft)
|
if (electricMode & QuickTileLeft)
|
||||||
ret.setRight(ret.left()+ret.width()/2);
|
ret.setRight(ret.left()+ret.width()/2 - 1);
|
||||||
else if (electricMode & QuickTileRight)
|
else if (electricMode & QuickTileRight)
|
||||||
ret.setLeft(ret.right()-ret.width()/2);
|
ret.setLeft(ret.right()-(ret.width()-ret.width()/2) + 1);
|
||||||
if (electricMode & QuickTileTop)
|
if (electricMode & QuickTileTop)
|
||||||
ret.setBottom(ret.top()+ret.height()/2);
|
ret.setBottom(ret.top()+ret.height()/2 - 1);
|
||||||
else if (electricMode & QuickTileBottom)
|
else if (electricMode & QuickTileBottom)
|
||||||
ret.setTop(ret.bottom()-ret.height()/2);
|
ret.setTop(ret.bottom()-(ret.height()-ret.height()/2) + 1);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue