summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorRichard Nelson <richard@lindenlab.com>2009-09-23 22:25:18 +0000
committerRichard Nelson <richard@lindenlab.com>2009-09-23 22:25:18 +0000
commitafcdda2e361855e2a02eb39c8cec080019ac769f (patch)
tree1e064f259b35aca3cf5c685c3993656b09ec8d1e /indra/llui
parent8a9204596af763d618ec6e67a5289b4799e1a1e2 (diff)
EXT-904 Build tools does not show tooltips on any checkbox
EXT-877 There is no tooltip with a date for Time indicator in Nav bar EXT-860 Crosshairs and "Press ESC to..." warning are dislocated in mouselook mode when UI Size is not exactly set to 1.00 (Menu Me -> Preferences-> Graphics) EXT-783 Script editor inserts text twice when using the editors paste, or choosing LSL elements from the pull-down list. EXT-764 mis-location of cursor in edit script panel (fixed cursor width) EXT-658 Inventory window's "Fetched Items" needs spacing reviewed by James
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/lltextbase.cpp3
-rw-r--r--indra/llui/lltextbox.cpp7
-rw-r--r--indra/llui/lltexteditor.cpp17
-rw-r--r--indra/llui/llview.cpp27
4 files changed, 33 insertions, 21 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index cb60b4fe36..0fd6a14187 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -420,8 +420,9 @@ BOOL LLTextBase::handleToolTipForUrl(LLView *view, S32 x, S32 y, std::string& ms
LLToolTipMgr::instance().show(LLToolTipParams()
.message(tooltip_msg)
.sticky_rect(sticky_rect_screen));
+ return TRUE;
}
- return TRUE;
+ return FALSE;
}
LLContextMenu *LLTextBase::createUrlContextMenu(const std::string &in_url)
diff --git a/indra/llui/lltextbox.cpp b/indra/llui/lltextbox.cpp
index 9de474a4f5..d6ae9e063e 100644
--- a/indra/llui/lltextbox.cpp
+++ b/indra/llui/lltextbox.cpp
@@ -161,7 +161,12 @@ BOOL LLTextBox::handleHover(S32 x, S32 y, MASK mask)
BOOL LLTextBox::handleToolTip(S32 x, S32 y, std::string& msg, LLRect& sticky_rect_screen)
{
- return handleToolTipForUrl(this, x, y, msg, sticky_rect_screen);
+ if (handleToolTipForUrl(this, x, y, msg, sticky_rect_screen))
+ {
+ return TRUE;
+ }
+
+ return LLUICtrl::handleToolTip(x, y, msg, sticky_rect_screen);
}
void LLTextBox::setText(const LLStringExplicit& text)
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 983777b747..8d5f277b59 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -1120,21 +1120,12 @@ void LLTextEditor::updateCursorXPos()
}
// constraint cursor to editable segments of document
+// NOTE: index must be within document range
S32 LLTextEditor::getEditableIndex(S32 index, bool increasing_direction)
{
- //// always allow editable position at end of doc
- //if (index == getLength())
- //{
- // return index;
- //}
-
segment_set_t::iterator segment_iter;
S32 offset;
getSegmentAndOffset(index, &segment_iter, &offset);
- if (segment_iter == mSegments.end())
- {
- return 0;
- }
LLTextSegmentPtr segmentp = *segment_iter;
@@ -3194,7 +3185,11 @@ void LLTextEditor::draw()
drawLineNumbers();
{
- LLLocalClipRect clip(mTextRect);
+ // pad clipping rectangle so that cursor can draw at full width
+ // when at left edge of mTextRect
+ LLRect clip_rect(mTextRect);
+ clip_rect.stretch(1);
+ LLLocalClipRect clip(clip_rect);
drawSelectionBackground();
drawPreeditMarker();
drawText();
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 8d723877d6..256c776293 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -675,9 +675,13 @@ LLView* LLView::childrenHandleToolTip(S32 x, S32 y, std::string& msg, LLRect& st
LLView* viewp = *child_it;
S32 local_x = x - viewp->getRect().mLeft;
S32 local_y = y - viewp->getRect().mBottom;
- if(viewp->pointInView(local_x, local_y) &&
- viewp->getVisible() &&
- viewp->handleToolTip(local_x, local_y, msg, sticky_rect_screen) )
+ if(!viewp->pointInView(local_x, local_y) ||
+ !viewp->getVisible())
+ {
+ continue;
+ }
+
+ if(viewp->handleToolTip(local_x, local_y, msg, sticky_rect_screen) )
{
if (sDebugMouseHandling)
{
@@ -687,17 +691,22 @@ LLView* LLView::childrenHandleToolTip(S32 x, S32 y, std::string& msg, LLRect& st
handled_view = viewp;
break;
}
+
+ if( viewp->blockMouseEvent(x, y) )
+ {
+ handled_view = viewp;
+ }
}
return handled_view;
}
BOOL LLView::handleToolTip(S32 x, S32 y, std::string& msg, LLRect& sticky_rect_screen)
{
- LLView* child_handler = childrenHandleToolTip(x, y, msg, sticky_rect_screen);
- BOOL handled = child_handler != NULL;
+ BOOL handled = FALSE;
- // child widgets get priority on tooltips
- if (!handled && !mToolTipMsg.empty())
+ // parents provide tooltips first, which are optionally
+ // overridden by children
+ if (!mToolTipMsg.empty())
{
// allow "scrubbing" over ui by showing next tooltip immediately
// if previous one was still visible
@@ -712,7 +721,9 @@ BOOL LLView::handleToolTip(S32 x, S32 y, std::string& msg, LLRect& sticky_rect_s
handled = TRUE;
}
- if( blockMouseEvent(x, y) )
+ // child tooltips will override our own
+ LLView* child_handler = childrenHandleToolTip(x, y, msg, sticky_rect_screen);
+ if (child_handler)
{
handled = TRUE;
}