diff options
author | Richard Linden <none@none> | 2012-02-10 16:42:04 -0800 |
---|---|---|
committer | Richard Linden <none@none> | 2012-02-10 16:42:04 -0800 |
commit | 5cfedfe4db3639863cf0cd0ae90e8b6a58a221dd (patch) | |
tree | 31f92293307cf7153ef38675e720e8c4d1c4498a /indra | |
parent | 5d276be881593b9e2c247edf8e6361447e964d52 (diff) | |
parent | 6a6cf3aa78b328c5a4cb78ad1b4f9f2fb831c8e4 (diff) |
Automated merge with ssh://hg.lindenlab.com/richard/viewer-experience-merge/
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/lltextbase.cpp | 10 | ||||
-rw-r--r-- | indra/llui/llview.cpp | 5 |
2 files changed, 9 insertions, 6 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 35abe48510..15c2d4946c 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1192,7 +1192,7 @@ void LLTextBase::reflow() // shrink document to minimum size (visible portion of text widget) // to force inlined widgets with follows set to shrink - mDocumentView->reshape(mVisibleTextRect.getWidth(), mDocumentView->getRect().getHeight()); + //mDocumentView->reshape(mVisibleTextRect.getWidth(), mDocumentView->getRect().getHeight()); S32 cur_top = 0; @@ -2380,7 +2380,8 @@ S32 LLTextBase::getEditableIndex(S32 index, bool increasing_direction) void LLTextBase::updateRects() { - mVisibleTextRect = getLocalRect(); + LLRect old_text_rect = mVisibleTextRect; + mVisibleTextRect = mScroller ? mScroller->getContentWindowRect() : getLocalRect(); if (mLineInfoList.empty()) { @@ -2403,10 +2404,10 @@ void LLTextBase::updateRects() switch(mVAlign) { case LLFontGL::TOP: - delta_pos = llmax(mVisibleTextRect.mTop - mTextBoundingRect.mTop, -mTextBoundingRect.mBottom); + delta_pos = llmax(mVisibleTextRect.getHeight() - mTextBoundingRect.mTop, -mTextBoundingRect.mBottom); break; case LLFontGL::VCENTER: - delta_pos = (llmax(mVisibleTextRect.mTop - mTextBoundingRect.mTop, -mTextBoundingRect.mBottom) + (mVisibleTextRect.mBottom - mTextBoundingRect.mBottom)) / 2; + delta_pos = (llmax(mVisibleTextRect.getHeight() - mTextBoundingRect.mTop, -mTextBoundingRect.mBottom) + (mVisibleTextRect.mBottom - mTextBoundingRect.mBottom)) / 2; break; case LLFontGL::BOTTOM: delta_pos = mVisibleTextRect.mBottom - mTextBoundingRect.mBottom; @@ -2459,7 +2460,6 @@ void LLTextBase::updateRects() //update mVisibleTextRect *after* mDocumentView has been resized // so that scrollbars are added if document needs to scroll // since mVisibleTextRect does not include scrollbars - LLRect old_text_rect = mVisibleTextRect; mVisibleTextRect = mScroller ? mScroller->getContentWindowRect() : getLocalRect(); //FIXME: replace border with image? if (mBorderVisible) diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index d22e14745f..421166dcd4 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -1300,7 +1300,10 @@ void LLView::reshape(S32 width, S32 height, BOOL called_from_parent) S32 delta_x = child_rect.mLeft - viewp->getRect().mLeft; S32 delta_y = child_rect.mBottom - viewp->getRect().mBottom; viewp->translate( delta_x, delta_y ); - viewp->reshape(child_rect.getWidth(), child_rect.getHeight()); + if (child_rect.getWidth() != viewp->getRect().getWidth() || child_rect.getHeight() != viewp->getRect().getHeight()) + { + viewp->reshape(child_rect.getWidth(), child_rect.getHeight()); + } } } |