diff options
| author | Paul Guslisty <pguslisty@productengine.com> | 2010-11-29 16:48:58 +0200 | 
|---|---|---|
| committer | Paul Guslisty <pguslisty@productengine.com> | 2010-11-29 16:48:58 +0200 | 
| commit | 2f0919b175444221783942ce6f49e2e04a725227 (patch) | |
| tree | 4cd441b1870ff58ff86d8b673f7def8810fbc21f | |
| parent | bca2162c4fac7f80f6137f4a8bae9bc7740eb8e1 (diff) | |
STORM-688 FIXED Sidebar becomes semitransparent if dock semitransparent side panel back to the Sidebar
- Before docking the tab back to the sidetray, set floater's children to non-transparent state
- After detaching tab from the sidetray there is no need to set manually floater's children transparency. It happens automatically when floater gets focus.
| -rw-r--r-- | indra/llui/llfloater.cpp | 13 | ||||
| -rw-r--r-- | indra/llui/llfloater.h | 4 | ||||
| -rw-r--r-- | indra/newview/llsidetray.cpp | 9 | 
3 files changed, 17 insertions, 9 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 720ff86aa7..da5dad6b82 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1189,7 +1189,7 @@ void LLFloater::setFocus( BOOL b )  			last_focus->setFocus(TRUE);  		}  	} -	updateChildrenTransparency(this); +	updateChildrenTransparency(this, b ? TT_ACTIVE : TT_INACTIVE);  }  // virtual @@ -1768,13 +1768,11 @@ void	LLFloater::drawShadow(LLPanel* panel)  		llround(shadow_offset));  } -void LLFloater::updateChildrenTransparency(LLView* ctrl) +void LLFloater::updateChildrenTransparency(LLView* ctrl, ETypeTransparency transparency_type)  {  	child_list_t children = *ctrl->getChildList();  	child_list_t::iterator it = children.begin(); -	ETypeTransparency transparency_type = hasFocus() ? TT_ACTIVE : TT_INACTIVE; -  	for(; it != children.end(); ++it)  	{  		LLUICtrl* ui_ctrl = dynamic_cast<LLUICtrl*>(*it); @@ -1782,10 +1780,15 @@ void LLFloater::updateChildrenTransparency(LLView* ctrl)  		{  			ui_ctrl->setTransparencyType(transparency_type);  		} -		updateChildrenTransparency(*it); +		updateChildrenTransparency(*it, transparency_type);  	}  } +void LLFloater::updateChildrenTransparency(ETypeTransparency transparency_type) +{ +	updateChildrenTransparency(this, transparency_type); +} +  void	LLFloater::setCanMinimize(BOOL can_minimize)  {  	// if removing minimize/restore button programmatically, diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index e312702257..2ec233f454 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -284,6 +284,8 @@ public:  	static void		setFloaterHost(LLMultiFloater* hostp) {sHostp = hostp; }  	static LLMultiFloater* getFloaterHost() {return sHostp; } + +	void			updateChildrenTransparency(ETypeTransparency transparency_type);  protected: @@ -343,7 +345,7 @@ private:  	static void		updateActiveFloaterTransparency();  	static void		updateInactiveFloaterTransparency(); -	void			updateChildrenTransparency(LLView* ctrl); +	void			updateChildrenTransparency(LLView* ctrl, ETypeTransparency transparency_type);  public:  	// Called when floater is opened, passes mKey diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index a4f855f279..526f3d1e77 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -118,7 +118,7 @@ public:  protected:  	LLSideTrayTab(const Params& params); -	void			dock(); +	void			dock(LLFloater* floater_tab);  	void			undock(LLFloater* floater_tab);  	LLSideTray*		getSideTray(); @@ -259,7 +259,7 @@ void LLSideTrayTab::toggleTabDocked()  	if (docking)  	{ -		dock(); +		dock(floater_tab);  	}  	else  	{ @@ -271,11 +271,14 @@ void LLSideTrayTab::toggleTabDocked()  	LLFloaterReg::toggleInstance("side_bar_tab", tab_name);  } -void LLSideTrayTab::dock() +void LLSideTrayTab::dock(LLFloater* floater_tab)  {  	LLSideTray* side_tray = getSideTray();  	if (!side_tray) return; +	// Before docking the tab, reset its (and its children's) transparency to default (STORM-688). +	floater_tab->updateChildrenTransparency(TT_DEFAULT); +  	if (!side_tray->addTab(this))  	{  		llwarns << "Failed to add tab " << getName() << " to side tray" << llendl;  | 
