diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llimconversation.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llnearbychat.cpp | 32 | 
2 files changed, 19 insertions, 17 deletions
diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp index acdd7ba46a..c855a844cf 100644 --- a/indra/newview/llimconversation.cpp +++ b/indra/newview/llimconversation.cpp @@ -254,9 +254,7 @@ void LLIMConversation::updateHeaderAndToolbar()  	if (mDragHandle)  	{  		mDragHandle->setTitleVisible(!is_hosted); -		setCanDrag(!is_hosted);  	} -	setCanResize(!is_hosted);  	// The button (>>) should be disabled for torn off P2P conversations.  	mExpandCollapseBtn->setEnabled(is_hosted || !mIsP2PChat); @@ -349,8 +347,6 @@ void LLIMConversation::onOpen(const LLSD& key)  		host_floater->collapseMessagesPane(false);  	} -	setCanResize(TRUE); -  	updateHeaderAndToolbar();  } diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index a81d6b4025..13e9eeee66 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -364,20 +364,18 @@ void LLNearbyChat::onOpen(const LLSD& key)  bool LLNearbyChat::applyRectControl()  { -	bool rect_controlled = LLFloater::applyRectControl(); +	bool is_torn_off = getHost() == NULL; -/*	if (!mNearbyChat->getVisible()) +	// Resize is limited to torn off floaters. +	// A hosted floater is not resizable. +	if (is_torn_off)  	{ -		reshape(getRect().getWidth(), getMinHeight()); -		enableResizeCtrls(true, true, false); -	} -	else -	{*/  		enableResizeCtrls(true); -		setResizeLimits(getMinWidth(), EXPANDED_MIN_HEIGHT); -//	} +	} -	return rect_controlled; +	setResizeLimits(getMinWidth(), EXPANDED_MIN_HEIGHT); + +	return LLFloater::applyRectControl();  }  void LLNearbyChat::onChatFontChange(LLFontGL* fontp) @@ -408,9 +406,17 @@ void LLNearbyChat::showHistory()  {  	openFloater();  	setResizeLimits(getMinWidth(), EXPANDED_MIN_HEIGHT); -	reshape(getRect().getWidth(), mExpandedHeight); -	enableResizeCtrls(true); -	storeRectControl(); + +	bool is_torn_off = getHost() == NULL; + +	// Reshape and enable resize controls only if it's a torn off floater. +	// Otherwise all the size changes should be handled by LLIMFloaterContainer. +	if (is_torn_off) +	{ +		reshape(getRect().getWidth(), mExpandedHeight); +		enableResizeCtrls(true); +		storeRectControl(); +	}  }  std::string LLNearbyChat::getCurrentChat()  | 
