In Area, remove unused ItemFrame() method.

Also modify Frame() method to return a rect with rounded coordinates.
This commit is contained in:
Alex Wilson
2012-05-03 08:44:21 +12:00
parent 574533ef12
commit 8b52747974
2 changed files with 3 additions and 12 deletions
-1
View File
@@ -107,7 +107,6 @@ public:
void InvalidateSizeConstraints();
BRect Frame() const;
BRect ItemFrame() const;
private:
Area(BLayoutItem* item);
+3 -11
View File
@@ -491,15 +491,8 @@ Area::InvalidateSizeConstraints()
BRect
Area::Frame() const
{
return BRect(fLeft->Value(), fTop->Value(), fRight->Value(),
fBottom->Value());
}
BRect
Area::ItemFrame() const
{
return fLayoutItem->Frame();
return BRect(round(fLeft->Value()), round(fTop->Value()),
round(fRight->Value()), round(fBottom->Value()));
}
@@ -615,8 +608,7 @@ Area::_DoLayout()
if (!fLeft)
return;
BRect areaFrame(round(fLeft->Value()), round(fTop->Value()),
round(fRight->Value()), round(fBottom->Value()));
BRect areaFrame(Frame());
areaFrame.left += LeftInset();
areaFrame.right -= RightInset();
areaFrame.top += TopInset();