From e3946fee881761428b05e1a7e9e8e92e1abff592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 23 May 2006 02:17:31 +0000 Subject: [PATCH] * The window resizing is now limited to some useful bounds - this fixes bug #617. * The two buttons weren't aligned correctly (called MakeDefault() too early). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17561 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/preferences/filetypes/TypeListWindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); }