summaryrefslogtreecommitdiff
path: root/indra/newview/llscreenchannel.cpp
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2010-12-24 20:20:26 +0200
committerVadim ProductEngine <vsavchuk@productengine.com>2010-12-24 20:20:26 +0200
commitf644ef0fb00aa622cb132553bc33d38f8b454ecd (patch)
tree64929a09af2b93f080b500c7bda45f80777c7b56 /indra/newview/llscreenchannel.cpp
parent265616ca0229db12a6343645732a5014feecd795 (diff)
STORM-682 FIXED Fixed positioning notification toasts in mouse-look mode.
Toasts were positioned as if side tray was expanded. The fix is to reshape the so-called toasts screen channel (an area where toasts are drawn) on entering/leaving mouse-look mode, so that the screen channel can notice that side tray get in/visible.
Diffstat (limited to 'indra/newview/llscreenchannel.cpp')
-rw-r--r--indra/newview/llscreenchannel.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 0eeb89792b..22b65e3120 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -83,11 +83,10 @@ bool LLScreenChannelBase::isHovering()
return mHoveredToast->isHovered();
}
-bool LLScreenChannelBase::resetPositionAndSize(const LLSD& newvalue)
+void LLScreenChannelBase::resetPositionAndSize()
{
LLRect rc = gViewerWindow->getWorldViewRectScaled();
updatePositionAndSize(rc, rc);
- return true;
}
void LLScreenChannelBase::updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect)
@@ -99,10 +98,7 @@ void LLScreenChannelBase::updatePositionAndSize(LLRect old_world_rect, LLRect ne
if (gSavedSettings.getBOOL("SidebarCameraMovement") == FALSE
&& LLSideTray::instanceCreated ())
{
- LLSideTray* side_bar = LLSideTray::getInstance();
-
- if (side_bar->getVisible() && !side_bar->getCollapsed())
- world_rect_padding += side_bar->getRect().getWidth();
+ world_rect_padding += LLSideTray::getInstance()->getVisibleWidth();
}
@@ -133,7 +129,7 @@ void LLScreenChannelBase::init(S32 channel_left, S32 channel_right)
if(LLSideTray::instanceCreated())
{
LLSideTray* side_bar = LLSideTray::getInstance();
- side_bar->getCollapseSignal().connect(boost::bind(&LLScreenChannelBase::resetPositionAndSize, this, _2));
+ side_bar->setVisibleWidthChangeCallback(boost::bind(&LLScreenChannelBase::resetPositionAndSize, this));
}
// top and bottom set by updateBottom()
@@ -214,10 +210,7 @@ void LLScreenChannel::updatePositionAndSize(LLRect old_world_rect, LLRect new_wo
if (gSavedSettings.getBOOL("SidebarCameraMovement") == FALSE
&& LLSideTray::instanceCreated ())
{
- LLSideTray* side_bar = LLSideTray::getInstance();
-
- if (side_bar->getVisible() && !side_bar->getCollapsed())
- world_rect_padding += side_bar->getRect().getWidth();
+ world_rect_padding += LLSideTray::getInstance()->getVisibleWidth();
}