In Area, remove unused ItemFrame() method.
Also modify Frame() method to return a rect with rounded coordinates.
This commit is contained in:
@@ -107,7 +107,6 @@ public:
|
||||
void InvalidateSizeConstraints();
|
||||
|
||||
BRect Frame() const;
|
||||
BRect ItemFrame() const;
|
||||
|
||||
private:
|
||||
Area(BLayoutItem* item);
|
||||
|
||||
+3
-11
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user