Fixed normal bug EXT-4696 - Teleport offer window is not alligned to the center of game area

--HG--
branch : product-engine
meow-7.2.2
Dmitry Zaporozhan 2010-02-02 17:04:31 +02:00
parent 38315a063d
commit 85cb82fdda
1 changed files with 12 additions and 11 deletions

View File

@ -487,10 +487,21 @@ void LLScreenChannel::showToastsBottom()
toast_rect.setOriginAndSize(getRect().mLeft, bottom + toast_margin, toast_rect.getWidth() ,toast_rect.getHeight());
(*it).toast->setRect(toast_rect);
// don't show toasts if there is not enough space
if(floater && floater->overlapsScreenChannel())
{
if(it == mToastList.rbegin())
{
// move first toast above docked floater
S32 shift = floater->getRect().getHeight();
if(floater->getDockControl())
{
shift += floater->getDockControl()->getTongueHeight();
}
(*it).toast->translate(0, shift);
}
LLRect world_rect = gViewerWindow->getWorldViewRectScaled();
// don't show toasts if there is not enough space
if(toast_rect.mTop > world_rect.mTop)
{
break;
@ -802,16 +813,6 @@ void LLScreenChannel::updateShowToastsState()
S32 channel_bottom = gViewerWindow->getWorldViewRectScaled().mBottom + gSavedSettings.getS32("ChannelBottomPanelMargin");;
LLRect this_rect = getRect();
// adjust channel's height
if(floater->overlapsScreenChannel())
{
channel_bottom += floater->getRect().getHeight();
if(floater->getDockControl())
{
channel_bottom += floater->getDockControl()->getTongueHeight();
}
}
if(channel_bottom != this_rect.mBottom)
{
setRect(LLRect(this_rect.mLeft, this_rect.mTop, this_rect.mRight, channel_bottom));