From da9fb3310970fbb0fb3cd7ee74686cab7283870a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 2 Feb 2006 17:07:36 +0000 Subject: [PATCH] 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 --- src/kits/interface/StringView.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/kits/interface/StringView.cpp b/src/kits/interface/StringView.cpp index 7692230e0d..293cf091ff 100644 --- a/src/kits/interface/StringView.cpp +++ b/src/kits/interface/StringView.cpp @@ -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); }