Change the semantic of the SetSame*As function. I think its easier to understand now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38959 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -498,8 +498,8 @@ Area::GetString(BString& string) const
|
|||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Sets the width of the area times factor to be the same as the width of the
|
* Sets the width of the area to be the same as the width of the given area
|
||||||
* given area.
|
* times factor.
|
||||||
*
|
*
|
||||||
* @param area the area that should have the same width
|
* @param area the area that should have the same width
|
||||||
* @return the same-width constraint
|
* @return the same-width constraint
|
||||||
@@ -507,14 +507,14 @@ Area::GetString(BString& string) const
|
|||||||
Constraint*
|
Constraint*
|
||||||
Area::SetWidthAs(Area* area, float factor)
|
Area::SetWidthAs(Area* area, float factor)
|
||||||
{
|
{
|
||||||
return fLS->AddConstraint(-factor, fLeft, factor, fRight, 1.0, area->Left(),
|
return fLS->AddConstraint(-1.0, fLeft, 1.0, fRight, factor, area->Left(),
|
||||||
-1.0, area->Right(), OperatorType(EQ), 0.0);
|
-factor, area->Right(), OperatorType(EQ), 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Sets the height of the area times factor to be the same as the height of the
|
* Sets the height of the area to be the same as the height of the given area
|
||||||
* given area.
|
* times factor.
|
||||||
*
|
*
|
||||||
* @param area the area that should have the same height
|
* @param area the area that should have the same height
|
||||||
* @return the same-height constraint
|
* @return the same-height constraint
|
||||||
@@ -522,8 +522,8 @@ Area::SetWidthAs(Area* area, float factor)
|
|||||||
Constraint*
|
Constraint*
|
||||||
Area::SetHeightAs(Area* area, float factor)
|
Area::SetHeightAs(Area* area, float factor)
|
||||||
{
|
{
|
||||||
return fLS->AddConstraint(-factor, fTop, factor, fBottom, 1.0, area->Top(),
|
return fLS->AddConstraint(-1.0, fTop, 1.0, fBottom, factor, area->Top(),
|
||||||
-1.0, area->Bottom(), OperatorType(EQ), 0.0);
|
-factor, area->Bottom(), OperatorType(EQ), 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user