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:
@@ -151,6 +151,10 @@ BStringView::ResizeToPreferred()
|
|||||||
float width, height;
|
float width, height;
|
||||||
GetPreferredSize(&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);
|
BView::ResizeTo(width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user