BScrollBar: Unify PreferredSize computations.
Reduces code duplication. This should not significantly affect actually computed sizes.
This commit is contained in:
parent
9fe3529f3e
commit
9481a1ec39
@ -1043,12 +1043,8 @@ BScrollBar::MaxSize()
|
|||||||
BSize
|
BSize
|
||||||
BScrollBar::PreferredSize()
|
BScrollBar::PreferredSize()
|
||||||
{
|
{
|
||||||
BSize preferredSize = _MinSize();
|
BSize preferredSize;
|
||||||
if (fOrientation == B_HORIZONTAL)
|
GetPreferredSize(&preferredSize.width, &preferredSize.height);
|
||||||
preferredSize.width *= 2;
|
|
||||||
else
|
|
||||||
preferredSize.height *= 2;
|
|
||||||
|
|
||||||
return BLayoutUtils::ComposeSize(ExplicitPreferredSize(), preferredSize);
|
return BLayoutUtils::ComposeSize(ExplicitPreferredSize(), preferredSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user