* B_SUPPORTS_LAYOUT is already added by the BView consturctor.
* Fixed MaxSize() and PreferredSize() to use the correct explicitly set size. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29847 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -31,7 +31,7 @@ BScrollView::BScrollView(const char *name, BView *target, uint32 resizingMode,
|
|||||||
|
|
||||||
BScrollView::BScrollView(const char* name, BView* target, uint32 flags,
|
BScrollView::BScrollView(const char* name, BView* target, uint32 flags,
|
||||||
bool horizontal, bool vertical, border_style border)
|
bool horizontal, bool vertical, border_style border)
|
||||||
: BView(name, _ModifyFlags(flags, border) | B_SUPPORTS_LAYOUT),
|
: BView(name, _ModifyFlags(flags, border)),
|
||||||
fTarget(target),
|
fTarget(target),
|
||||||
fBorder(border)
|
fBorder(border)
|
||||||
{
|
{
|
||||||
@@ -753,7 +753,7 @@ BScrollView::MaxSize()
|
|||||||
BSize size = _ComputeSize(fTarget != NULL ? fTarget->MaxSize()
|
BSize size = _ComputeSize(fTarget != NULL ? fTarget->MaxSize()
|
||||||
: BSize(B_SIZE_UNLIMITED, B_SIZE_UNLIMITED));
|
: BSize(B_SIZE_UNLIMITED, B_SIZE_UNLIMITED));
|
||||||
|
|
||||||
return BLayoutUtils::ComposeSize(ExplicitMinSize(), size);
|
return BLayoutUtils::ComposeSize(ExplicitMaxSize(), size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -763,7 +763,7 @@ BScrollView::PreferredSize()
|
|||||||
BSize size = _ComputeSize(fTarget != NULL ? fTarget->PreferredSize()
|
BSize size = _ComputeSize(fTarget != NULL ? fTarget->PreferredSize()
|
||||||
: BSize(32, 32));
|
: BSize(32, 32));
|
||||||
|
|
||||||
return BLayoutUtils::ComposeSize(ExplicitMinSize(), size);
|
return BLayoutUtils::ComposeSize(ExplicitPreferredSize(), size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user