summaryrefslogtreecommitdiff
path: root/indra/newview/llscreenchannel.cpp
diff options
context:
space:
mode:
authorChuck Linden <chuck@lindenlab.com>2010-02-18 11:13:54 -0500
committerChuck Linden <chuck@lindenlab.com>2010-02-18 11:13:54 -0500
commit1ca9c1dcfef3a935be30a5322c91d5e3df523a98 (patch)
tree50aa5ccc5924d4296454dd3e8dcee7edddaf520b /indra/newview/llscreenchannel.cpp
parent1ae70e112a466a6ed5baf4e05c1771218c78b2f5 (diff)
parent9dfff8c6d2a54e3f6e069c26cc8753dc9331aec1 (diff)
Automated merge with file:///Users/chuck/Documents/hg/viewer-hotfix
Diffstat (limited to 'indra/newview/llscreenchannel.cpp')
-rw-r--r--indra/newview/llscreenchannel.cpp25
1 files changed, 7 insertions, 18 deletions
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 7c2e7e3319..c75d90be6f 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -79,17 +79,12 @@ LLScreenChannelBase::~LLScreenChannelBase()
bool LLScreenChannelBase::isHovering()
{
- bool res = mHoveredToast != NULL;
- if (!res)
+ if (!mHoveredToast)
{
- return res;
+ return false;
}
- S32 x, y;
- mHoveredToast->screenPointToLocal(gViewerWindow->getCurrentMouseX(),
- gViewerWindow->getCurrentMouseY(), &x, &y);
- res = mHoveredToast->pointInView(x, y) == TRUE;
- return res;
+ return mHoveredToast->isHovered();
}
void LLScreenChannelBase::updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect)
@@ -479,7 +474,8 @@ void LLScreenChannel::showToastsBottom()
{
if(it != mToastList.rbegin())
{
- bottom = (*(it-1)).toast->getRect().mTop;
+ LLToast* toast = (*(it-1)).toast;
+ bottom = toast->getRect().mTop - toast->getTopPad();
toast_margin = gSavedSettings.getS32("ToastGap");
}
@@ -777,23 +773,16 @@ void LLScreenChannel::onToastHover(LLToast* toast, bool mouse_enter)
{
// because of LLViewerWindow::updateUI() that NOT ALWAYS calls onMouseEnter BEFORE onMouseLeave
// we must check hovering directly to prevent incorrect setting for hovering in a channel
- S32 x,y;
if (mouse_enter)
{
- toast->screenPointToLocal(gViewerWindow->getCurrentMouseX(),
- gViewerWindow->getCurrentMouseY(), &x, &y);
- bool hover = toast->pointInView(x, y) == TRUE;
- if (hover)
+ if (toast->isHovered())
{
mHoveredToast = toast;
}
}
else if (mHoveredToast != NULL)
{
- mHoveredToast->screenPointToLocal(gViewerWindow->getCurrentMouseX(),
- gViewerWindow->getCurrentMouseY(), &x, &y);
- bool hover = mHoveredToast->pointInView(x, y) == TRUE;
- if (!hover)
+ if (!mHoveredToast->isHovered())
{
mHoveredToast = NULL;
}