Now sets the height of the parameter web correctly (wasn't visible with the
Media preferences application alone). Replaced the BBox with a simple BView for the container of a BParameterGroup. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3801 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -219,8 +219,13 @@ DefaultMediaTheme::MakeViewFor(BParameterWeb *web, const BRect *hintRect)
|
|||||||
|
|
||||||
tabView->AddTab(groupView);
|
tabView->AddTab(groupView);
|
||||||
|
|
||||||
|
// enlarge the bounding rectangle as needed
|
||||||
|
|
||||||
if (groupView->Bounds().Width() + 5 > rect.Width())
|
if (groupView->Bounds().Width() + 5 > rect.Width())
|
||||||
rect.right = groupView->Bounds().Width() - 1;
|
rect.right = groupView->Bounds().Width() - 1;
|
||||||
|
|
||||||
|
if (groupView->Bounds().Height() > rect.Height())
|
||||||
|
rect.bottom = groupView->Bounds().Height();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tabView != NULL) {
|
if (tabView != NULL) {
|
||||||
@@ -228,6 +233,8 @@ DefaultMediaTheme::MakeViewFor(BParameterWeb *web, const BRect *hintRect)
|
|||||||
|
|
||||||
rect = tabView->Bounds();
|
rect = tabView->Bounds();
|
||||||
rect.InsetBySelf(1, 1);
|
rect.InsetBySelf(1, 1);
|
||||||
|
rect.top += tabView->TabHeight();
|
||||||
|
|
||||||
tabView->ContainerView()->ResizeTo(rect.Width(), rect.Height());
|
tabView->ContainerView()->ResizeTo(rect.Width(), rect.Height());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -244,8 +251,8 @@ DefaultMediaTheme::MakeViewFor(BParameterGroup &group, const BRect &hintRect)
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
BRect rect(hintRect);
|
BRect rect(hintRect);
|
||||||
BBox *view = new BBox(rect, group.Name());
|
BView *view = new BView(rect, group.Name(), B_FOLLOW_ALL, B_WILL_DRAW);
|
||||||
view->SetBorder(B_NO_BORDER);
|
view->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||||
|
|
||||||
// Add the sub-group views
|
// Add the sub-group views
|
||||||
|
|
||||||
@@ -365,7 +372,7 @@ DefaultMediaTheme::MakeSelfHostingViewFor(BParameter ¶meter, const BRect &hi
|
|||||||
if (parameter.Group()->ParameterAt(0) == ¶meter) {
|
if (parameter.Group()->ParameterAt(0) == ¶meter) {
|
||||||
// this is the first parameter in this group, so
|
// this is the first parameter in this group, so
|
||||||
// let's use a nice title view
|
// let's use a nice title view
|
||||||
|
|
||||||
TitleView *titleView = new TitleView(hintRect, parameter.Name());
|
TitleView *titleView = new TitleView(hintRect, parameter.Name());
|
||||||
titleView->ResizeToPreferred();
|
titleView->ResizeToPreferred();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user