diff options
| author | Seth ProductEngine <slitovchuk@productengine.com> | 2012-05-07 22:40:56 +0300 |
|---|---|---|
| committer | Seth ProductEngine <slitovchuk@productengine.com> | 2012-05-07 22:40:56 +0300 |
| commit | fac210075f4c68db372ae0535e332ffe9765a5d1 (patch) | |
| tree | 6c92b8145c1a056da7dd979e778f455d6da08397 /indra/newview/llimfloatercontainer.cpp | |
| parent | 7b8251fd2f169136fc45e4c17104da676f75727b (diff) | |
CHUI-105 WIP Added tear-off and return behavior for IM floater.
XUI changed for Converstions multifloater and IM floater.
Diffstat (limited to 'indra/newview/llimfloatercontainer.cpp')
| -rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index c8e48b0d42..9b5055fb98 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -56,6 +56,9 @@ BOOL LLIMFloaterContainer::postBuild() mNewMessageConnection = LLIMModel::instance().mNewMsgSignal.connect(boost::bind(&LLIMFloaterContainer::onNewMessageReceived, this, _1)); // Do not call base postBuild to not connect to mCloseSignal to not close all floaters via Close button // mTabContainer will be initialized in LLMultiFloater::addChild() + + setTabContainer(getChild<LLTabContainer>("im_box_tab_container")); + return TRUE; } @@ -74,6 +77,7 @@ void LLIMFloaterContainer::onOpen(const LLSD& key) */ } +// virtual void LLIMFloaterContainer::addFloater(LLFloater* floaterp, BOOL select_added_floater, LLTabContainer::eInsertionPoint insertion_point) @@ -89,6 +93,12 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp, LLMultiFloater::addFloater(floaterp, select_added_floater, insertion_point); + LLView* floater_contents = floaterp->getChild<LLView>("contents_view"); + + // we don't show the header when the floater is hosted, + // so reshape floater contents to occupy the header space + floater_contents->setShape(floaterp->getRect()); + LLUUID session_id = floaterp->getKey(); LLIconCtrl* icon = 0; @@ -116,6 +126,20 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp, mTabContainer->setTabImage(floaterp, icon); } +// virtual +void LLIMFloaterContainer::removeFloater(LLFloater* floaterp) +{ + LLMultiFloater::removeFloater(floaterp); + + LLRect contents_rect = floaterp->getRect(); + + // reduce the floater contents height by header height + contents_rect.mTop -= floaterp->getHeaderHeight(); + + LLView* floater_contents = floaterp->getChild<LLView>("contents_view"); + floater_contents->setShape(contents_rect); +} + void LLIMFloaterContainer::onCloseFloater(LLUUID& id) { mSessions.erase(id); |
