diff options
author | Oz Linden <oz@lindenlab.com> | 2011-10-22 06:46:26 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-10-22 06:46:26 -0400 |
commit | 23f05269535d7c36806913244de419d7ab0b9f46 (patch) | |
tree | 34c996678f96d1b0ad69cc64dbe39454dc516d69 /indra/newview/llnearbychatbar.cpp | |
parent | 2a206cff7982db662c58436f870c6383b396d7df (diff) | |
parent | f5197b6158bf1b9350fab2dd7877f6c0a4c2f778 (diff) |
merge changes for STORM-1661
Diffstat (limited to 'indra/newview/llnearbychatbar.cpp')
-rw-r--r-- | indra/newview/llnearbychatbar.cpp | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 3e4228cfb6..a811332261 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -53,6 +53,8 @@ S32 LLNearbyChatBar::sLastSpecialChatChannel = 0; const S32 EXPANDED_HEIGHT = 300; +const S32 COLLAPSED_HEIGHT = 60; +const S32 EXPANDED_MIN_HEIGHT = 150; // legacy callback glue void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel); @@ -102,7 +104,7 @@ BOOL LLNearbyChatBar::postBuild() // Register for font change notifications LLViewerChat::setFontChangedCallback(boost::bind(&LLNearbyChatBar::onChatFontChange, this, _1)); - mExpandedHeight = getMinHeight() + EXPANDED_HEIGHT; + mExpandedHeight = COLLAPSED_HEIGHT + EXPANDED_HEIGHT; enableResizeCtrls(true, true, false); @@ -112,14 +114,19 @@ BOOL LLNearbyChatBar::postBuild() bool LLNearbyChatBar::applyRectControl() { bool rect_controlled = LLFloater::applyRectControl(); - - if (getRect().getHeight() > getMinHeight()) + + LLView* nearby_chat = getChildView("nearby_chat"); + if (!nearby_chat->getVisible()) + { + reshape(getRect().getWidth(), getMinHeight()); + enableResizeCtrls(true, true, false); + } + else { - getChildView("nearby_chat")->setVisible(true); - mExpandedHeight = getRect().getHeight(); enableResizeCtrls(true); + setResizeLimits(getMinWidth(), EXPANDED_MIN_HEIGHT); } - + return rect_controlled; } @@ -373,15 +380,19 @@ void LLNearbyChatBar::onToggleNearbyChatPanel() if (nearby_chat->getVisible()) { mExpandedHeight = getRect().getHeight(); + setResizeLimits(getMinWidth(), COLLAPSED_HEIGHT); nearby_chat->setVisible(FALSE); - reshape(getRect().getWidth(), getMinHeight()); + reshape(getRect().getWidth(), COLLAPSED_HEIGHT); enableResizeCtrls(true, true, false); + storeRectControl(); } else { nearby_chat->setVisible(TRUE); + setResizeLimits(getMinWidth(), EXPANDED_MIN_HEIGHT); reshape(getRect().getWidth(), mExpandedHeight); enableResizeCtrls(true); + storeRectControl(); } } |