From 1bbd259f2d009a807a09aea15d01d0872f8b1cad Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 6 Jan 2010 11:17:38 -0800 Subject: EXT-3878 - Menus disappear when UI Size is < 1.00 EXT-3647 - Auto-scrolling of IMs should resume when user types in chat EXT-3877 - Pinning two levels of menus prevents movement using arrow keys EXT-1303 - Hyperlink text wraps in the middle of a word reviewed by James --- indra/newview/llhudtext.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/llhudtext.cpp') diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 0b5da40be4..b95e5f53e8 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -607,6 +607,11 @@ void LLHUDText::addLine(const LLWString &wstr, const LLColor4& color, const LLFo do { S32 segment_length = mFontp->maxDrawableChars(iter->substr(line_length).c_str(), mUseBubble ? HUD_TEXT_MAX_WIDTH : HUD_TEXT_MAX_WIDTH_NO_BUBBLE, wline.length(), TRUE); + if (segment_length == 0) + { + // try again without wrapping on word boundaries + segment_length = mFontp->maxDrawableChars(iter->substr(line_length).c_str(), mUseBubble ? HUD_TEXT_MAX_WIDTH : HUD_TEXT_MAX_WIDTH_NO_BUBBLE, wline.length(), FALSE); + } mTextSegments.push_back(LLHUDTextSegment(iter->substr(line_length, segment_length), style, color)); line_length += segment_length; } @@ -643,6 +648,11 @@ void LLHUDText::setLabel(const LLWString &wlabel) do { S32 segment_length = mFontp->maxDrawableChars(iter->substr(line_length).c_str(), mUseBubble ? HUD_TEXT_MAX_WIDTH : HUD_TEXT_MAX_WIDTH_NO_BUBBLE, wstr.length(), TRUE); + if (segment_length == 0) + { + // try again without wrapping on word boundaries + segment_length = mFontp->maxDrawableChars(iter->substr(line_length).c_str(), mUseBubble ? HUD_TEXT_MAX_WIDTH : HUD_TEXT_MAX_WIDTH_NO_BUBBLE, wstr.length(), FALSE); + } mLabelSegments.push_back(LLHUDTextSegment(iter->substr(line_length, segment_length), LLFontGL::NORMAL, mColor)); line_length += segment_length; } -- cgit v1.2.3 From 49660730308fb6d5301d1617402a353a21e9d9be Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 6 Jan 2010 12:23:56 -0800 Subject: moved clipping logic inside LLFontGL::maxDrawableChars controlled by EWordWrapStyle fixes regression introduced in 3eef5ce9ae1e6fc62b9b52ce859501dd4e70fadf reviewed by Brad --- indra/newview/llhudtext.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'indra/newview/llhudtext.cpp') diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index b95e5f53e8..08cf86df4a 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -606,12 +606,7 @@ void LLHUDText::addLine(const LLWString &wstr, const LLColor4& color, const LLFo U32 line_length = 0; do { - S32 segment_length = mFontp->maxDrawableChars(iter->substr(line_length).c_str(), mUseBubble ? HUD_TEXT_MAX_WIDTH : HUD_TEXT_MAX_WIDTH_NO_BUBBLE, wline.length(), TRUE); - if (segment_length == 0) - { - // try again without wrapping on word boundaries - segment_length = mFontp->maxDrawableChars(iter->substr(line_length).c_str(), mUseBubble ? HUD_TEXT_MAX_WIDTH : HUD_TEXT_MAX_WIDTH_NO_BUBBLE, wline.length(), FALSE); - } + S32 segment_length = mFontp->maxDrawableChars(iter->substr(line_length).c_str(), mUseBubble ? HUD_TEXT_MAX_WIDTH : HUD_TEXT_MAX_WIDTH_NO_BUBBLE, wline.length(), LLFontGL::WORD_BOUNDARY_IF_POSSIBLE); mTextSegments.push_back(LLHUDTextSegment(iter->substr(line_length, segment_length), style, color)); line_length += segment_length; } @@ -647,12 +642,7 @@ void LLHUDText::setLabel(const LLWString &wlabel) U32 line_length = 0; do { - S32 segment_length = mFontp->maxDrawableChars(iter->substr(line_length).c_str(), mUseBubble ? HUD_TEXT_MAX_WIDTH : HUD_TEXT_MAX_WIDTH_NO_BUBBLE, wstr.length(), TRUE); - if (segment_length == 0) - { - // try again without wrapping on word boundaries - segment_length = mFontp->maxDrawableChars(iter->substr(line_length).c_str(), mUseBubble ? HUD_TEXT_MAX_WIDTH : HUD_TEXT_MAX_WIDTH_NO_BUBBLE, wstr.length(), FALSE); - } + S32 segment_length = mFontp->maxDrawableChars(iter->substr(line_length).c_str(), mUseBubble ? HUD_TEXT_MAX_WIDTH : HUD_TEXT_MAX_WIDTH_NO_BUBBLE, wstr.length(), LLFontGL::WORD_BOUNDARY_IF_POSSIBLE); mLabelSegments.push_back(LLHUDTextSegment(iter->substr(line_length, segment_length), LLFontGL::NORMAL, mColor)); line_length += segment_length; } -- cgit v1.2.3