App Server: Style fixes to DefaultWindowBehaviour
...take 2. Replace 0.0f with 0 as per discussion on -commits Break long line differently Remove extra whitespace at the beginning of a line
This commit is contained in:
@@ -241,7 +241,7 @@ struct DefaultWindowBehaviour::DragState : MouseTrackingState {
|
|||||||
// constrain delta to true change in position
|
// constrain delta to true change in position
|
||||||
delta = fWindow->Frame().LeftTop() - oldLeftTop;
|
delta = fWindow->Frame().LeftTop() - oldLeftTop;
|
||||||
} else
|
} else
|
||||||
delta = BPoint(0.0f, 0.0f);
|
delta = BPoint(0, 0);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -261,9 +261,9 @@ struct DefaultWindowBehaviour::ResizeState : MouseTrackingState {
|
|||||||
{
|
{
|
||||||
if ((fWindow->Flags() & B_NOT_RESIZABLE) == 0) {
|
if ((fWindow->Flags() & B_NOT_RESIZABLE) == 0) {
|
||||||
if ((fWindow->Flags() & B_NOT_V_RESIZABLE) != 0)
|
if ((fWindow->Flags() & B_NOT_V_RESIZABLE) != 0)
|
||||||
delta.y = 0.0f;
|
delta.y = 0;
|
||||||
if ((fWindow->Flags() & B_NOT_H_RESIZABLE) != 0)
|
if ((fWindow->Flags() & B_NOT_H_RESIZABLE) != 0)
|
||||||
delta.x = 0.0f;
|
delta.x = 0;
|
||||||
|
|
||||||
BPoint oldRightBottom = fWindow->Frame().RightBottom();
|
BPoint oldRightBottom = fWindow->Frame().RightBottom();
|
||||||
|
|
||||||
@@ -272,7 +272,7 @@ struct DefaultWindowBehaviour::ResizeState : MouseTrackingState {
|
|||||||
// constrain delta to true change in size
|
// constrain delta to true change in size
|
||||||
delta = fWindow->Frame().RightBottom() - oldRightBottom;
|
delta = fWindow->Frame().RightBottom() - oldRightBottom;
|
||||||
} else
|
} else
|
||||||
delta = BPoint(0.0f, 0.0f);
|
delta = BPoint(0, 0);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -300,9 +300,9 @@ struct DefaultWindowBehaviour::SlideTabState : MouseTrackingState {
|
|||||||
location += delta.x;
|
location += delta.x;
|
||||||
AdjustMultiTabLocation(location, true);
|
AdjustMultiTabLocation(location, true);
|
||||||
if (fDesktop->SetWindowTabLocation(fWindow, location, true))
|
if (fDesktop->SetWindowTabLocation(fWindow, location, true))
|
||||||
delta.y = 0.0f;
|
delta.y = 0;
|
||||||
else
|
else
|
||||||
delta = BPoint(0.0f, 0.0f);
|
delta = BPoint(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdjustMultiTabLocation(float location, bool isShifting)
|
void AdjustMultiTabLocation(float location, bool isShifting)
|
||||||
@@ -328,19 +328,17 @@ struct DefaultWindowBehaviour::SlideTabState : MouseTrackingState {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (movingTab->tabOffset > location) {
|
if (movingTab->tabOffset > location) {
|
||||||
if (location
|
if (location > neighbourTab->tabOffset
|
||||||
> neighbourTab->tabOffset + neighbourTab->tabRect.Width()
|
+ neighbourTab->tabRect.Width() / 2) {
|
||||||
/ 2) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (location + movingTab->tabRect.Width()
|
if (location + movingTab->tabRect.Width() < neighbourTab->tabOffset
|
||||||
< neighbourTab->tabOffset + neighbourTab->tabRect.Width()
|
+ neighbourTab->tabRect.Width() / 2) {
|
||||||
/ 2) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fWindow->MoveToStackPosition(neighbourIndex, isShifting);
|
fWindow->MoveToStackPosition(neighbourIndex, isShifting);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user