Skip to content
Snippets Groups Projects
Commit 7b0dab50 authored by Dmitry Zaporozhan's avatar Dmitry Zaporozhan
Browse files

(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
parent e22850f5
No related branches found
No related tags found
No related merge requests found
...@@ -371,12 +371,34 @@ void LLAccordionCtrl::arrangeSinge() ...@@ -371,12 +371,34 @@ void LLAccordionCtrl::arrangeSinge()
panel_height = accordion_tab->getRect().getHeight(); panel_height = accordion_tab->getRect().getHeight();
} }
else else
{
if(mFitParent)
{ {
panel_height = expanded_height; 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); ctrlSetLeftTopAndSize(mAccordionTabs[i], panel_left, panel_top, panel_width, panel_height);
panel_top-=mAccordionTabs[i]->getRect().getHeight(); panel_top-=mAccordionTabs[i]->getRect().getHeight();
} }
show_hide_scrollbar(getRect().getWidth(), getRect().getHeight());
updateLayout(getRect().getWidth(), getRect().getHeight());
} }
void LLAccordionCtrl::arrangeMultiple() void LLAccordionCtrl::arrangeMultiple()
......
...@@ -98,6 +98,7 @@ background_visible="true" ...@@ -98,6 +98,7 @@ background_visible="true"
left="0" left="0"
top="0" top="0"
single_expansion="true" single_expansion="true"
fit_parent="true"
follows="all" follows="all"
layout="topleft" layout="topleft"
name="groups_accordion"> name="groups_accordion">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment