diff options
author | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2010-04-01 17:28:36 +0300 |
---|---|---|
committer | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2010-04-01 17:28:36 +0300 |
commit | 7b0dab508363e5da1ab180bdd0f8d63f1985105c (patch) | |
tree | 4c3e54543eb424f8a77f91b70f8fbc418680bf79 | |
parent | e22850f57dacca829f4623b019895ac75aae0663 (diff) |
(work in progress) Update for LLAccordionCtrl arrange single expansion.
Found this issue while working on EXT-6564(Fix wearable editing panels) - Every single_expansion accordion is treated like "fit_parent" is set to "true" after changes made in 9805 : e6c5f3b23be1 (fix for EXT-5128 Groups accordions should all appear on-screen w/out scrolling (open accordion should fill space)).
Updated accordion to take into account "fit_parent" property.
Reviewed by Vadim Savchuk - https://codereview.productengine.com/secondlife/r/147/
--HG--
branch : product-engine
-rw-r--r-- | indra/llui/llaccordionctrl.cpp | 24 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml | 1 |
2 files changed, 24 insertions, 1 deletions
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp index 2ed1082f56..cdcf780d2e 100644 --- a/indra/llui/llaccordionctrl.cpp +++ b/indra/llui/llaccordionctrl.cpp @@ -372,11 +372,33 @@ void LLAccordionCtrl::arrangeSinge() } else { - panel_height = expanded_height; + if(mFitParent) + { + panel_height = expanded_height; + } + else + { + if(accordion_tab->getAccordionView()) + { + panel_height = accordion_tab->getAccordionView()->getRect().getHeight() + + accordion_tab->getHeaderHeight() + 2*BORDER_MARGIN; + } + else + { + panel_height = accordion_tab->getRect().getHeight(); + } + } } + + // make sure at least header is shown + panel_height = llmax(panel_height, accordion_tab->getHeaderHeight()); + ctrlSetLeftTopAndSize(mAccordionTabs[i], panel_left, panel_top, panel_width, panel_height); panel_top-=mAccordionTabs[i]->getRect().getHeight(); } + + show_hide_scrollbar(getRect().getWidth(), getRect().getHeight()); + updateLayout(getRect().getWidth(), getRect().getHeight()); } void LLAccordionCtrl::arrangeMultiple() diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml index 701a14e1c5..789d69bc68 100644 --- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml @@ -98,6 +98,7 @@ background_visible="true" left="0" top="0" single_expansion="true" + fit_parent="true" follows="all" layout="topleft" name="groups_accordion"> |