summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llrender/llfontgl.cpp2
-rw-r--r--indra/llui/llconsole.cpp5
-rw-r--r--indra/llui/llmenugl.cpp55
-rw-r--r--indra/newview/llchathistory.cpp6
-rw-r--r--indra/newview/llhudtext.cpp10
-rw-r--r--indra/newview/llviewerwindow.cpp2
6 files changed, 53 insertions, 27 deletions
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index 37a28ac721..d3497c1c23 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -562,7 +562,7 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch
drawn_x = cur_x;
}
- if( clip && end_on_word_boundary && (start_of_last_word != 0) )
+ if( clip && end_on_word_boundary )
{
i = start_of_last_word;
}
diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp
index fa0abd55d0..7248581ec6 100644
--- a/indra/llui/llconsole.cpp
+++ b/indra/llui/llconsole.cpp
@@ -331,6 +331,11 @@ void LLConsole::Paragraph::updateLines(F32 screen_width, const LLFontGL* font, b
}
U32 drawable = font->maxDrawableChars(mParagraphText.c_str()+paragraph_offset, screen_width, line_end - paragraph_offset, TRUE);
+ if (drawable == 0)
+ {
+ // try again without wrapping on word boundaries
+ drawable = font->maxDrawableChars(mParagraphText.c_str()+paragraph_offset, screen_width, line_end - paragraph_offset, FALSE);
+ }
if (drawable != 0)
{
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 2648cbf08d..527c0a1b87 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -1143,37 +1143,41 @@ BOOL LLMenuItemBranchGL::handleKeyHere( KEY key, MASK mask )
if (!branch)
return LLMenuItemGL::handleKeyHere(key, mask);
- if (getMenu()->getVisible() && branch->getVisible() && key == KEY_LEFT)
+ // an item is highlighted, my menu is open, and I have an active sub menu or we are in
+ // keyboard navigation mode
+ if (getHighlight()
+ && getMenu()->isOpen()
+ && (isActive() || LLMenuGL::getKeyboardMode()))
{
- // switch to keyboard navigation mode
- LLMenuGL::setKeyboardMode(TRUE);
-
- BOOL handled = branch->clearHoverItem();
- if (branch->getTornOff())
+ if (branch->getVisible() && key == KEY_LEFT)
{
- ((LLFloater*)branch->getParent())->setFocus(FALSE);
- }
- if (handled && getMenu()->getTornOff())
- {
- ((LLFloater*)getMenu()->getParent())->setFocus(TRUE);
- }
- return handled;
- }
+ // switch to keyboard navigation mode
+ LLMenuGL::setKeyboardMode(TRUE);
- if (getHighlight() &&
- getMenu()->isOpen() &&
- key == KEY_RIGHT && !branch->getHighlightedItem())
- {
- // switch to keyboard navigation mode
- LLMenuGL::setKeyboardMode(TRUE);
+ BOOL handled = branch->clearHoverItem();
+ if (branch->getTornOff())
+ {
+ ((LLFloater*)branch->getParent())->setFocus(FALSE);
+ }
+ if (handled && getMenu()->getTornOff())
+ {
+ ((LLFloater*)getMenu()->getParent())->setFocus(TRUE);
+ }
+ return handled;
+ }
- LLMenuItemGL* itemp = branch->highlightNextItem(NULL);
- if (itemp)
+ if (key == KEY_RIGHT && !branch->getHighlightedItem())
{
- return TRUE;
+ // switch to keyboard navigation mode
+ LLMenuGL::setKeyboardMode(TRUE);
+
+ LLMenuItemGL* itemp = branch->highlightNextItem(NULL);
+ if (itemp)
+ {
+ return TRUE;
+ }
}
}
-
return LLMenuItemGL::handleKeyHere(key, mask);
}
@@ -1431,7 +1435,7 @@ BOOL LLMenuItemBranchDownGL::handleKeyHere(KEY key, MASK mask)
{
BOOL menu_open = getBranch()->getVisible();
// don't do keyboard navigation of top-level menus unless in keyboard mode, or menu expanded
- if (getHighlight() && getMenu()->getVisible() && (isActive() || LLMenuGL::getKeyboardMode()))
+ if (getHighlight() && getMenu()->isOpen() && (isActive() || LLMenuGL::getKeyboardMode()))
{
if (key == KEY_LEFT)
{
@@ -2836,6 +2840,7 @@ BOOL LLMenuGL::handleScrollWheel( S32 x, S32 y, S32 clicks )
return TRUE;
}
+
void LLMenuGL::draw( void )
{
if (mNeedsArrange)
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 21cadda6e3..dac3280575 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -593,6 +593,12 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_
mEditor->appendText(message, FALSE, style_params);
}
mEditor->blockUndo();
+
+ // automatically scroll to end when receiving chat from myself
+ if (chat.mFromID == gAgentID)
+ {
+ mEditor->setCursorAndScrollToEnd();
+ }
}
void LLChatHistory::draw()
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;
}
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 1400253176..83cbc8a1f9 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1897,7 +1897,7 @@ void LLViewerWindow::draw()
if (!gSavedSettings.getBOOL("RenderUIBuffer"))
{
- LLUI::sDirtyRect = this->getWindowRectRaw();
+ LLUI::sDirtyRect = getWindowRectScaled();
}
// HACK for timecode debugging