Fix resizing by dragging top-right window corner

The top-right corner case was overlooked when switching from QRect to
QRectF, which results in the window having wrong size.

BUG: 460501
This commit is contained in:
Vlad Zahorodnii 2022-10-17 10:53:30 +03:00
parent ed9a52778c
commit 207e78386a

View file

@ -1891,7 +1891,7 @@ void Window::handleInteractiveMoveResize(int x, int y, int x_root, int y_root)
nextMoveResizeGeom = QRectF(QPointF(topleft.x(), orig.y()), QPointF(orig.right(), bottomright.y())); nextMoveResizeGeom = QRectF(QPointF(topleft.x(), orig.y()), QPointF(orig.right(), bottomright.y()));
break; break;
case Gravity::TopRight: case Gravity::TopRight:
nextMoveResizeGeom = QRect(QPoint(orig.x(), topleft.y()), QPoint(bottomright.x(), orig.bottom())); nextMoveResizeGeom = QRectF(QPointF(orig.x(), topleft.y()), QPointF(bottomright.x(), orig.bottom()));
break; break;
case Gravity::Top: case Gravity::Top:
nextMoveResizeGeom = QRectF(QPointF(orig.left(), topleft.y()), orig.bottomRight()); nextMoveResizeGeom = QRectF(QPointF(orig.left(), topleft.y()), orig.bottomRight());