diff options
| author | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2010-04-01 17:41:47 +0300 | 
|---|---|---|
| committer | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2010-04-01 17:41:47 +0300 | 
| commit | 3c036ef49b1e8690f5efe29393a4990e117e5bfe (patch) | |
| tree | d76246460f354c476027250aa6243d116241c574 /indra/llui | |
| parent | 7b0dab508363e5da1ab180bdd0f8d63f1985105c (diff) | |
(work in progress) EXT-6564(major) - Fix wearable editing panels
Fixed Edit Shape panel layout:
- fixed widget positioning according to spec
- added gear button bar
- fixed accordion positioning
- fixed parameter list positioning
TODO:
- fix parameter panel positioning
- apply changes to the rest of wearable panels
Reviewed by Vadim Savchuk - https://codereview.productengine.com/secondlife/r/149/
--HG--
branch : product-engine
Diffstat (limited to 'indra/llui')
| -rw-r--r-- | indra/llui/llscrollingpanellist.cpp | 28 | ||||
| -rw-r--r-- | indra/llui/llscrollingpanellist.h | 6 | 
2 files changed, 30 insertions, 4 deletions
| diff --git a/indra/llui/llscrollingpanellist.cpp b/indra/llui/llscrollingpanellist.cpp index 4f55c0507c..b7840d1b59 100644 --- a/indra/llui/llscrollingpanellist.cpp +++ b/indra/llui/llscrollingpanellist.cpp @@ -47,7 +47,12 @@ void LLScrollingPanelList::clearPanels()  {  	deleteAllChildren();  	mPanelList.clear(); -	reshape( 1, 1, FALSE ); + +	LLRect rc = getRect(); +	rc.setLeftTopAndSize(rc.mLeft, rc.mTop, 1, 1); +	setRect(rc); + +	notifySizeChanged(rc.getHeight());  }  S32 LLScrollingPanelList::addPanel( LLScrollingPanel* panel ) @@ -67,7 +72,11 @@ S32 LLScrollingPanelList::addPanel( LLScrollingPanel* panel )  		max_width = llmax( max_width, childp->getRect().getWidth() );  		cur_gap = GAP_BETWEEN_PANELS;  	} -	reshape( max_width, total_height, FALSE ); + 	LLRect rc = getRect(); + 	rc.setLeftTopAndSize(rc.mLeft, rc.mTop, max_width, total_height); + 	setRect(rc); + +	notifySizeChanged(rc.getHeight());  	// Reposition each of the child views  	S32 cur_y = total_height; @@ -131,7 +140,11 @@ void LLScrollingPanelList::removePanel( U32 panel_index )  		max_width = llmax( max_width, childp->getRect().getWidth() );  		cur_gap = GAP_BETWEEN_PANELS;  	} -	reshape( max_width, total_height, FALSE ); +	LLRect rc = getRect(); +	rc.setLeftTopAndSize(rc.mLeft, rc.mTop, max_width, total_height); +	setRect(rc); + +	notifySizeChanged(rc.getHeight());  	// Reposition each of the child views  	S32 cur_y = total_height; @@ -200,3 +213,12 @@ void LLScrollingPanelList::draw()  	LLUICtrl::draw();  } +void LLScrollingPanelList::notifySizeChanged(S32 height) +{ +	LLSD info; +	info["action"] = "size_changes"; +	info["height"] = height; +	notifyParent(info); +} + +// EOF diff --git a/indra/llui/llscrollingpanellist.h b/indra/llui/llscrollingpanellist.h index 3abfbcbbe7..5f1996159b 100644 --- a/indra/llui/llscrollingpanellist.h +++ b/indra/llui/llscrollingpanellist.h @@ -61,7 +61,6 @@ public:  		Params()  		{  			name = "scrolling_panel_list"; -			follows.flags = FOLLOWS_LEFT | FOLLOWS_BOTTOM;  		}  	};  	LLScrollingPanelList(const Params& p) @@ -86,6 +85,11 @@ public:  private:  	void				updatePanelVisiblilty(); +	/** +	 * Notify parent about size change, makes sense when used inside accordion +	 */ +	void				notifySizeChanged(S32 height); +  	panel_list_t		mPanelList;  }; | 
