The BMessage constructor of BScrollBar had a couple of rather important
omissions. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30319 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -243,6 +243,8 @@ BScrollBar::BScrollBar(BMessage* data)
|
|||||||
fTarget(NULL),
|
fTarget(NULL),
|
||||||
fTargetName(NULL)
|
fTargetName(NULL)
|
||||||
{
|
{
|
||||||
|
fPrivateData = new BScrollBar::Private(this);
|
||||||
|
|
||||||
// TODO: Does the BeOS implementation try to find the target
|
// TODO: Does the BeOS implementation try to find the target
|
||||||
// by name again? Does it archive the name at all?
|
// by name again? Does it archive the name at all?
|
||||||
if (data->FindFloat("_range", 0, &fMin) < B_OK)
|
if (data->FindFloat("_range", 0, &fMin) < B_OK)
|
||||||
@@ -252,17 +254,26 @@ BScrollBar::BScrollBar(BMessage* data)
|
|||||||
if (data->FindFloat("_steps", 0, &fSmallStep) < B_OK)
|
if (data->FindFloat("_steps", 0, &fSmallStep) < B_OK)
|
||||||
fSmallStep = 1.0;
|
fSmallStep = 1.0;
|
||||||
if (data->FindFloat("_steps", 1, &fLargeStep) < B_OK)
|
if (data->FindFloat("_steps", 1, &fLargeStep) < B_OK)
|
||||||
fSmallStep = 10.0;
|
fLargeStep = 10.0;
|
||||||
if (data->FindFloat("_val", &fValue) < B_OK)
|
if (data->FindFloat("_val", &fValue) < B_OK)
|
||||||
fValue = 0.0;
|
fValue = 0.0;
|
||||||
int32 orientation;
|
int32 orientation;
|
||||||
if (data->FindInt32("_orient", &orientation) < B_OK)
|
if (data->FindInt32("_orient", &orientation) < B_OK) {
|
||||||
fOrientation = B_VERTICAL;
|
fOrientation = B_VERTICAL;
|
||||||
else
|
if ((Flags() & B_SUPPORTS_LAYOUT) == 0) {
|
||||||
|
// just to make sure
|
||||||
|
SetResizingMode(fOrientation == B_VERTICAL
|
||||||
|
? B_FOLLOW_TOP_BOTTOM | B_FOLLOW_RIGHT
|
||||||
|
: B_FOLLOW_LEFT_RIGHT | B_FOLLOW_BOTTOM);
|
||||||
|
}
|
||||||
|
} else
|
||||||
fOrientation = (enum orientation)orientation;
|
fOrientation = (enum orientation)orientation;
|
||||||
|
|
||||||
if (data->FindFloat("_prop", &fProportion) < B_OK)
|
if (data->FindFloat("_prop", &fProportion) < B_OK)
|
||||||
fProportion = 0.0;
|
fProportion = 0.0;
|
||||||
|
|
||||||
|
_UpdateThumbFrame();
|
||||||
|
_UpdateArrowButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user