diff --git a/src/preferences/filetypes/TypeListWindow.cpp b/src/preferences/filetypes/TypeListWindow.cpp index 7ed4efe8b4..ddb966da1d 100644 --- a/src/preferences/filetypes/TypeListWindow.cpp +++ b/src/preferences/filetypes/TypeListWindow.cpp @@ -35,7 +35,6 @@ TypeListWindow::TypeListWindow(const char* currentType, uint32 what, BWindow* ta topView->Bounds().bottom - 8.0f - fSelectButton->Bounds().Height()); fSelectButton->SetEnabled(false); topView->AddChild(fSelectButton); - fSelectButton->MakeDefault(true); BButton* button = new BButton(fSelectButton->Frame(), "cancel", "Cancel", new BMessage(B_CANCEL), B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM); @@ -43,6 +42,8 @@ TypeListWindow::TypeListWindow(const char* currentType, uint32 what, BWindow* ta button->MoveBy(-button->Bounds().Width() - 8.0f, 0.0f); topView->AddChild(button); + fSelectButton->MakeDefault(true); + rect.bottom = button->Frame().top - 10.0f; rect.top = 10.0f; rect.left = 10.0f; @@ -57,6 +58,8 @@ TypeListWindow::TypeListWindow(const char* currentType, uint32 what, BWindow* ta topView->AddChild(scrollView); MoveTo(target->Frame().LeftTop() + BPoint(15.0f, 15.0f)); + SetSizeLimits(button->Bounds().Width() + fSelectButton->Bounds().Width() + 64.0f, 32767.0f, + fSelectButton->Bounds().Height() * 5.0f, 32767.0f); }