As suggested by Jérôme remove one level of indentation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39745 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d277bc8294
commit
fd5a5935a7
@ -794,37 +794,36 @@ SATWindow::_RestoreOriginalSize(bool stayBelowMouse)
|
|||||||
int32 buttons;
|
int32 buttons;
|
||||||
fDesktop->GetLastMouseState(&mousePosition, &buttons);
|
fDesktop->GetLastMouseState(&mousePosition, &buttons);
|
||||||
SATDecorator* decorator = GetDecorator();
|
SATDecorator* decorator = GetDecorator();
|
||||||
if (decorator) {
|
if (decorator == NULL)
|
||||||
BRect tabRect = decorator->TabRect();
|
return;
|
||||||
if (mousePosition.y < tabRect.bottom
|
BRect tabRect = decorator->TabRect();
|
||||||
&& mousePosition.x <= frame.right + decorator->BorderWidth() +1
|
if (mousePosition.y < tabRect.bottom
|
||||||
&& mousePosition.x >= frame.left + decorator->BorderWidth()) {
|
&& mousePosition.x <= frame.right + decorator->BorderWidth() +1
|
||||||
// verify mouse stays on the tab
|
&& mousePosition.x >= frame.left + decorator->BorderWidth()) {
|
||||||
float deltaX = 0;
|
// verify mouse stays on the tab
|
||||||
if (tabRect.right < mousePosition.x)
|
float deltaX = 0;
|
||||||
deltaX = mousePosition.x - tabRect.right + 20;
|
if (tabRect.right < mousePosition.x)
|
||||||
else if (tabRect.left > mousePosition.x)
|
deltaX = mousePosition.x - tabRect.right + 20;
|
||||||
deltaX = mousePosition.x - tabRect.left - 20;
|
else if (tabRect.left > mousePosition.x)
|
||||||
fDesktop->MoveWindowBy(fWindow, deltaX, 0);
|
deltaX = mousePosition.x - tabRect.left - 20;
|
||||||
} else {
|
fDesktop->MoveWindowBy(fWindow, deltaX, 0);
|
||||||
// verify mouse stays on the border
|
} else {
|
||||||
float deltaX = 0;
|
// verify mouse stays on the border
|
||||||
float deltaY = 0;
|
float deltaX = 0;
|
||||||
BRect newFrame = fWindow->Frame();
|
float deltaY = 0;
|
||||||
if (x != 0 && mousePosition.x > frame.left
|
BRect newFrame = fWindow->Frame();
|
||||||
&& mousePosition.x > newFrame.right) {
|
if (x != 0 && mousePosition.x > frame.left
|
||||||
deltaX = mousePosition.x - newFrame.right;
|
&& mousePosition.x > newFrame.right) {
|
||||||
if (mousePosition.x > frame.right)
|
deltaX = mousePosition.x - newFrame.right;
|
||||||
deltaX -= mousePosition.x - frame.right;
|
if (mousePosition.x > frame.right)
|
||||||
}
|
deltaX -= mousePosition.x - frame.right;
|
||||||
if (y != 0 && mousePosition.y > frame.top
|
|
||||||
&& mousePosition.y > newFrame.bottom) {
|
|
||||||
deltaY = mousePosition.y - newFrame.bottom;
|
|
||||||
if (mousePosition.y > frame.bottom)
|
|
||||||
deltaY -= mousePosition.y - frame.bottom;
|
|
||||||
}
|
|
||||||
|
|
||||||
fDesktop->MoveWindowBy(fWindow, deltaX, deltaY);
|
|
||||||
}
|
}
|
||||||
|
if (y != 0 && mousePosition.y > frame.top
|
||||||
|
&& mousePosition.y > newFrame.bottom) {
|
||||||
|
deltaY = mousePosition.y - newFrame.bottom;
|
||||||
|
if (mousePosition.y > frame.bottom)
|
||||||
|
deltaY -= mousePosition.y - frame.bottom;
|
||||||
|
}
|
||||||
|
fDesktop->MoveWindowBy(fWindow, deltaX, deltaY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user