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
|
||||
BScrollBar::PreferredSize()
|
||||
{
|
||||
BSize preferredSize = _MinSize();
|
||||
if (fOrientation == B_HORIZONTAL)
|
||||
preferredSize.width *= 2;
|
||||
else
|
||||
preferredSize.height *= 2;
|
||||
|
||||
BSize preferredSize;
|
||||
GetPreferredSize(&preferredSize.width, &preferredSize.height);
|
||||
return BLayoutUtils::ComposeSize(ExplicitPreferredSize(), preferredSize);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user