From ec397948975da960afe4fe625bd06d8b0b0341e6 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Wed, 21 Oct 2009 20:39:26 +0000 Subject: [PATCH] fix regression reported in #4826: * SetTextRect for non-wrapped textviews needs to update the insets, as otherwise several misalignments occur within several apps - renaming in Tracker was effected the worst, though git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33717 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/TextView.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/kits/interface/TextView.cpp b/src/kits/interface/TextView.cpp index b12d450aca..c8f800a8d1 100644 --- a/src/kits/interface/TextView.cpp +++ b/src/kits/interface/TextView.cpp @@ -2170,8 +2170,12 @@ BTextView::SetTextRect(BRect rect) if (rect == fTextRect) return; - if (fWrap) - fLayoutData->UpdateInsets(Bounds().OffsetToCopy(B_ORIGIN), rect); + if (!fWrap) { + rect.right = Bounds().right - fLayoutData->rightInset; + rect.bottom = Bounds().bottom - fLayoutData->bottomInset; + } + + fLayoutData->UpdateInsets(Bounds().OffsetToCopy(B_ORIGIN), rect); _ResetTextRect(); }