Now only resizes the width if it's too small or B_ALIGN_LEFT is used - it now

resizes a bit more logically.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16204 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2006-02-02 17:07:36 +00:00
parent 71c43a7a1e
commit da9fb33109

View File

@ -151,6 +151,10 @@ BStringView::ResizeToPreferred()
float width, height;
GetPreferredSize(&width, &height);
// Resize the width only for B_ALIGN_LEFT (if its large enough already, that is)
if (Bounds().Width() > width && Alignment() != B_ALIGN_LEFT)
width = Bounds().Width();
BView::ResizeTo(width, height);
}