From 3c036ef49b1e8690f5efe29393a4990e117e5bfe Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Thu, 1 Apr 2010 17:41:47 +0300 Subject: (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 --- indra/llui/llscrollingpanellist.cpp | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'indra/llui/llscrollingpanellist.cpp') 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 -- cgit v1.2.3