diff options
author | Yuri Chebotarev <ychebotarev@productengine.com> | 2010-06-09 13:16:21 +0300 |
---|---|---|
committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2010-06-09 13:16:21 +0300 |
commit | 60a92dbaa49b07eca00ebb12edff02c14f1f5f96 (patch) | |
tree | 819ba97715c707f677429659fdf22ec62c1474ad /indra | |
parent | 045af3acc747b43a0bbc7d1848e6a1a63f932c39 (diff) |
EXT-7328 FIX If accordion tab has "fit_to_panel" flag on its height shouldn't be changed while arranging accordion tabs even if its the only tab in ctrl.
reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/533/
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llaccordionctrl.cpp | 4 | ||||
-rw-r--r-- | indra/llui/llaccordionctrltab.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp index 6bf1347514..cd23d5cd33 100644 --- a/indra/llui/llaccordionctrl.cpp +++ b/indra/llui/llaccordionctrl.cpp @@ -352,7 +352,7 @@ void LLAccordionCtrl::addCollapsibleCtrl(LLView* view) mAccordionTabs.push_back(accordion_tab); accordion_tab->setDropDownStateChangedCallback( boost::bind(&LLAccordionCtrl::onCollapseCtrlCloseOpen, this, mAccordionTabs.size() - 1) ); - + arrange(); } void LLAccordionCtrl::removeCollapsibleCtrl(LLView* view) @@ -541,6 +541,8 @@ void LLAccordionCtrl::arrange() S32 panel_height = getRect().getHeight() - 2*BORDER_MARGIN; + if (accordion_tab->getFitParent()) + panel_height = accordion_tab->getRect().getHeight(); ctrlSetLeftTopAndSize(accordion_tab,panel_rect.mLeft,panel_top,panel_width,panel_height); show_hide_scrollbar(getRect().getWidth(),getRect().getHeight()); diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h index 82e0234bfc..480b26e130 100644 --- a/indra/llui/llaccordionctrltab.h +++ b/indra/llui/llaccordionctrltab.h @@ -190,6 +190,7 @@ public: void showAndFocusHeader(); void setFitPanel( bool fit ) { mFitPanel = true; } + bool getFitParent() const { return mFitPanel; } protected: void adjustContainerPanel (const LLRect& child_rect); |