From 2d359e77ba43ae82292fc4edadb489c4cb417574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 4 Mar 2004 01:59:10 +0000 Subject: [PATCH] Set a minimum size where the window is still usable and looks okay. The checkbox and the "find" button are now in the same row to make the window a bit smaller. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6893 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/diskprobe/FindWindow.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/apps/diskprobe/FindWindow.cpp b/src/apps/diskprobe/FindWindow.cpp index ac850a2162..e99845e2f3 100644 --- a/src/apps/diskprobe/FindWindow.cpp +++ b/src/apps/diskprobe/FindWindow.cpp @@ -413,7 +413,7 @@ FindWindow::FindWindow(BRect rect, BMessage &previous, BMessenger &target) fCaseCheckBox = new BCheckBox(rect, B_EMPTY_STRING, "Case sensitive", NULL, B_FOLLOW_LEFT | B_FOLLOW_BOTTOM); fCaseCheckBox->ResizeToPreferred(); - fCaseCheckBox->MoveTo(5, button->Frame().top - 5 - fCaseCheckBox->Bounds().Height()); + fCaseCheckBox->MoveTo(5, button->Frame().top); bool caseSensitive; if (previous.FindBool("case_sensitive", &caseSensitive) != B_OK) caseSensitive = true; @@ -423,7 +423,7 @@ FindWindow::FindWindow(BRect rect, BMessage &previous, BMessenger &target) // and now those inbetween rect.top = menuField->Frame().bottom + 5; - rect.bottom = fCaseCheckBox->Frame().top - 5; + rect.bottom = fCaseCheckBox->Frame().top - 8; rect.InsetBy(2, 2); fTextView = new FindTextView(rect, B_EMPTY_STRING, rect.OffsetToCopy(B_ORIGIN).InsetByCopy(3, 3), @@ -435,7 +435,10 @@ FindWindow::FindWindow(BRect rect, BMessage &previous, BMessenger &target) BScrollView *scrollView = new BScrollView("scroller", fTextView, B_FOLLOW_ALL, B_WILL_DRAW, false, false); view->AddChild(scrollView); - ResizeTo(290, button->Frame().Height() * 4 + 30); + ResizeTo(290, button->Frame().Height() * 3 + 30); + + SetSizeLimits(fCaseCheckBox->Bounds().Width() + button->Bounds().Width() + 20, + 32768, button->Frame().Height() * 3 + 10, 32768); }