From 4b582fd16ac72fbfd62ed66a0865d71aaa494ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 2 Jul 2003 02:58:36 +0000 Subject: [PATCH] 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 --- src/kits/media/DefaultMediaTheme.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/kits/media/DefaultMediaTheme.cpp b/src/kits/media/DefaultMediaTheme.cpp index 881952aa2b..fa086c8f7b 100644 --- a/src/kits/media/DefaultMediaTheme.cpp +++ b/src/kits/media/DefaultMediaTheme.cpp @@ -219,8 +219,13 @@ DefaultMediaTheme::MakeViewFor(BParameterWeb *web, const BRect *hintRect) tabView->AddTab(groupView); + // enlarge the bounding rectangle as needed + if (groupView->Bounds().Width() + 5 > rect.Width()) rect.right = groupView->Bounds().Width() - 1; + + if (groupView->Bounds().Height() > rect.Height()) + rect.bottom = groupView->Bounds().Height(); } if (tabView != NULL) { @@ -228,6 +233,8 @@ DefaultMediaTheme::MakeViewFor(BParameterWeb *web, const BRect *hintRect) rect = tabView->Bounds(); rect.InsetBySelf(1, 1); + rect.top += tabView->TabHeight(); + tabView->ContainerView()->ResizeTo(rect.Width(), rect.Height()); } @@ -244,8 +251,8 @@ DefaultMediaTheme::MakeViewFor(BParameterGroup &group, const BRect &hintRect) return NULL; BRect rect(hintRect); - BBox *view = new BBox(rect, group.Name()); - view->SetBorder(B_NO_BORDER); + BView *view = new BView(rect, group.Name(), B_FOLLOW_ALL, B_WILL_DRAW); + view->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); // Add the sub-group views @@ -365,7 +372,7 @@ DefaultMediaTheme::MakeSelfHostingViewFor(BParameter ¶meter, const BRect &hi if (parameter.Group()->ParameterAt(0) == ¶meter) { // this is the first parameter in this group, so // let's use a nice title view - + TitleView *titleView = new TitleView(hintRect, parameter.Name()); titleView->ResizeToPreferred();