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();
|
void InvalidateSizeConstraints();
|
||||||
|
|
||||||
BRect Frame() const;
|
BRect Frame() const;
|
||||||
BRect ItemFrame() const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Area(BLayoutItem* item);
|
Area(BLayoutItem* item);
|
||||||
|
|||||||
+3
-11
@@ -491,15 +491,8 @@ Area::InvalidateSizeConstraints()
|
|||||||
BRect
|
BRect
|
||||||
Area::Frame() const
|
Area::Frame() const
|
||||||
{
|
{
|
||||||
return BRect(fLeft->Value(), fTop->Value(), fRight->Value(),
|
return BRect(round(fLeft->Value()), round(fTop->Value()),
|
||||||
fBottom->Value());
|
round(fRight->Value()), round(fBottom->Value()));
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
BRect
|
|
||||||
Area::ItemFrame() const
|
|
||||||
{
|
|
||||||
return fLayoutItem->Frame();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -615,8 +608,7 @@ Area::_DoLayout()
|
|||||||
if (!fLeft)
|
if (!fLeft)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
BRect areaFrame(round(fLeft->Value()), round(fTop->Value()),
|
BRect areaFrame(Frame());
|
||||||
round(fRight->Value()), round(fBottom->Value()));
|
|
||||||
areaFrame.left += LeftInset();
|
areaFrame.left += LeftInset();
|
||||||
areaFrame.right -= RightInset();
|
areaFrame.right -= RightInset();
|
||||||
areaFrame.top += TopInset();
|
areaFrame.top += TopInset();
|
||||||
|
|||||||
Reference in New Issue
Block a user