diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h index 46491d8a29e9743bca40046254a26f217e7c070d..2c339f4a3f508ef10975f5fdf43a5144dc8c392a 100644 --- a/indra/llui/lldockablefloater.h +++ b/indra/llui/lldockablefloater.h @@ -83,6 +83,8 @@ class LLDockableFloater : public LLFloater virtual void onDockHidden(); virtual void onDockShown(); + LLDockControl* getDockControl(); + private: /** * Provides unique of dockable floater. @@ -92,7 +94,6 @@ class LLDockableFloater : public LLFloater protected: void setDockControl(LLDockControl* dockControl); - LLDockControl* getDockControl(); const LLUIImagePtr& getDockTongue(); private: diff --git a/indra/llui/lldockcontrol.h b/indra/llui/lldockcontrol.h index 30a45bedc74e43f3225fe9dfb404e6440fadc8a0..550955c4c537484ad5a0db3c44e2bd25bfb78749 100644 --- a/indra/llui/lldockcontrol.h +++ b/indra/llui/lldockcontrol.h @@ -76,6 +76,9 @@ class LLDockControl // gets a rect that bounds possible positions for a dockable control (EXT-1111) void getAllowedRect(LLRect& rect); + S32 getTongueWidth() { return mDockTongue->getWidth(); } + S32 getTongueHeight() { return mDockTongue->getHeight(); } + private: virtual void moveDockable(); private: diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 20d81362fdb7ea1ce2df4a88d5504fd1986ec0fc..08a65461b68d3fcd2481182dfccbf8fe15f86cfc 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5033,7 +5033,7 @@ <key>NotificationChannelHeightRatio</key> <map> <key>Comment</key> - <string>TODO</string> + <string>Notification channel and World View ratio(0.0 - always show 1 notification, 1.0 - max ratio).</string> <key>Persist</key> <integer>1</integer> <key>Type</key> diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 36c40eb49b4ea4b9829539ed8095c75c0c01ae3b..40ae112e4bbe9f13688ad660db427c43984f7f88 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -415,6 +415,7 @@ void LLIMFloater::setDocked(bool docked, bool pop_on_undock) if(channel) { channel->updateShowToastsState(); + channel->redrawToasts(); } } diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 87752e31f5236e9c2d001eb4ba144b8339e87b26..a1ea7aeb96e2dd2e23e9d6e56c3f63f975613d87 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -375,12 +375,6 @@ void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel) } } -void LLScreenChannel::onVisibleChanged(LLUICtrl* ctrl, const LLSD& param) -{ - updateShowToastsState(); - redrawToasts(); -} - //-------------------------------------------------------------------------- void LLScreenChannel::redrawToasts() { @@ -446,17 +440,11 @@ void LLScreenChannel::showToastsBottom() if( !(*it).toast->getVisible() ) { - if((*it).toast->isFirstLook()) - { - (*it).toast->setVisible(TRUE); - } - else - { - // HACK - // EXT-2653: it is necessary to prevent overlapping for secondary showed toasts - (*it).toast->setVisible(TRUE); - gFloaterView->sendChildToBack((*it).toast); - } + // HACK + // EXT-2653: it is necessary to prevent overlapping for secondary showed toasts + (*it).toast->setVisible(TRUE); + // Show toast behind floaters. (EXT-3089) + gFloaterView->sendChildToBack((*it).toast); } } @@ -774,7 +762,7 @@ void LLScreenChannel::onToastHover(LLToast* toast, bool mouse_enter) //-------------------------------------------------------------------------- void LLScreenChannel::updateShowToastsState() { - LLFloater* floater = LLDockableFloater::getInstanceHandle().get(); + LLDockableFloater* floater = dynamic_cast<LLDockableFloater*>(LLDockableFloater::getInstanceHandle().get()); if(!floater) { @@ -791,7 +779,8 @@ void LLScreenChannel::updateShowToastsState() LLRect this_rect = getRect(); if(floater->getVisible() && floater->isDocked()) { - channel_bottom = floater->getRect().mTop + gSavedSettings.getS32("ToastGap"); + channel_bottom += floater->getRect().getHeight(); + channel_bottom += floater->getDockControl()->getTongueHeight(); } if(channel_bottom != this_rect.mBottom) diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h index e384b17a0cd655e4c5b8b096075ef0f725b75be7..3b0ee2050cccb732f7c8033c93b77a06373c20df 100644 --- a/indra/newview/llscreenchannel.h +++ b/indra/newview/llscreenchannel.h @@ -265,6 +265,9 @@ class LLScreenChannel : public LLScreenChannelBase // create the StartUp Toast void createStartUpToast(S32 notif_num, F32 timer); + /** + * Notification channel and World View ratio(0.0 - always show 1 notification, 1.0 - max ratio). + */ static F32 getHeightRatio(); // Channel's flags diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 26caf0be6949471fab42040659fed2bbb58b71ce..28bdfbf2712e4c1b35507b263df526e823a8e94b 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -189,6 +189,7 @@ void LLSysWellWindow::setDocked(bool docked, bool pop_on_undock) if(mChannel) { mChannel->updateShowToastsState(); + mChannel->redrawToasts(); } }