Fixed the issue from ticket 4178 comment 5.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32229 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Pfeiffer 2009-08-10 17:57:43 +00:00
parent a57dddca06
commit 2f4e68fe98
1 changed files with 4 additions and 1 deletions

View File

@ -327,7 +327,10 @@ BPictureButton* ConfigWindow::AddPictureButton(BView* panel, BRect frame,
button->SetViewColor(B_TRANSPARENT_COLOR);
panel->AddChild(button);
onBM->Lock();
button->ResizeTo(onBM->Bounds().Width(), onBM->Bounds().Height());
int32 width = onBM->Bounds().Width();
int32 height = onBM->Bounds().Height();
button->ResizeTo(width, height);
button->SetExplicitMaxSize(BSize(width, height));
onBM->Unlock();
panel->RemoveChild(button);