summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimsessiontab.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-04-01 09:34:41 -0400
committerOz Linden <oz@lindenlab.com>2013-04-01 09:34:41 -0400
commit90b56ee9fa95ca8cc15e3abc81977f504eb32c5b (patch)
tree581e4ba644ebf770dbdab292ea9f10d4b9404cb6 /indra/newview/llfloaterimsessiontab.cpp
parent130e4e510198147664a2377b62b22d8e42f00f04 (diff)
parent49bef4e122e3ab4c82962e25f4ec1803c4e0c600 (diff)
merge changes for 3.5.0-beta7
Diffstat (limited to 'indra/newview/llfloaterimsessiontab.cpp')
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 5083331167..ce6e639305 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -64,6 +64,8 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id)
, mHasVisibleBeenInitialized(false)
, mIsParticipantListExpanded(true)
, mChatLayoutPanel(NULL)
+ , mInputPanels(NULL)
+ , mChatLayoutPanelHeight(0)
{
setAutoFocus(FALSE);
mSession = LLIMModel::getInstance()->findIMSession(mSessionID);
@@ -265,13 +267,15 @@ BOOL LLFloaterIMSessionTab::postBuild()
mInputEditor = getChild<LLChatEntry>("chat_editor");
mChatLayoutPanel = getChild<LLLayoutPanel>("chat_layout_panel");
+ mInputPanels = getChild<LLLayoutStack>("input_panels");
mInputEditor->setTextExpandedCallback(boost::bind(&LLFloaterIMSessionTab::reshapeChatLayoutPanel, this));
mInputEditor->setCommitOnFocusLost( FALSE );
mInputEditor->setPassDelete(TRUE);
mInputEditor->setFont(LLViewerChat::getChatFont());
- mInputEditorPad = mChatLayoutPanel->getRect().getHeight() - mInputEditor->getRect().getHeight();
+ mChatLayoutPanelHeight = mChatLayoutPanel->getRect().getHeight();
+ mInputEditorPad = mChatLayoutPanelHeight - mInputEditor->getRect().getHeight();
setOpenPositioning(LLFloaterEnums::POSITIONING_RELATIVE);
@@ -749,9 +753,7 @@ void LLFloaterIMSessionTab::forceReshape()
void LLFloaterIMSessionTab::reshapeChatLayoutPanel()
{
- LLRect chat_layout_panel_rect = mChatLayoutPanel->getRect();
- LLRect input_rect = mInputEditor->getRect();
- mChatLayoutPanel->reshape(chat_layout_panel_rect.getWidth(), input_rect.getHeight() + mInputEditorPad, FALSE);
+ mChatLayoutPanel->reshape(mChatLayoutPanel->getRect().getWidth(), mInputEditor->getRect().getHeight() + mInputEditorPad, FALSE);
}
void LLFloaterIMSessionTab::showTranslationCheckbox(BOOL show)
@@ -850,6 +852,7 @@ void LLFloaterIMSessionTab::onCollapseToLine(LLFloaterIMSessionTab* self)
self->mExpandCollapseLineBtn->setImageOverlay(self->getString(expand ? "collapseline_icon" : "expandline_icon"));
self->mContentPanel->setVisible(!expand);
self->mToolbarPanel->setVisible(!expand);
+ self->mInputEditor->enableSingleLineMode(expand);
self->reshapeFloater(expand);
self->setMessagePaneExpanded(!expand);
}
@@ -862,20 +865,20 @@ void LLFloaterIMSessionTab::reshapeFloater(bool collapse)
if(collapse)
{
mFloaterHeight = floater_rect.getHeight();
- S32 height = mContentPanel->getRect().getHeight() + mToolbarPanel->getRect().getHeight();
+ S32 height = mContentPanel->getRect().getHeight() + mToolbarPanel->getRect().getHeight()
+ + mChatLayoutPanel->getRect().getHeight() - mChatLayoutPanelHeight + 2;
floater_rect.mTop -= height;
- enableResizeCtrls(true, true, false);
}
else
{
floater_rect.mTop = floater_rect.mBottom + mFloaterHeight;
- enableResizeCtrls(true, true, true);
-
}
+
+ enableResizeCtrls(true, true, !collapse);
+
saveCollapsedState();
setShape(floater_rect, true);
mBodyStack->updateLayout();
-
}
void LLFloaterIMSessionTab::restoreFloater()