diff options
author | Richard Linden <none@none> | 2012-03-06 16:59:11 -0800 |
---|---|---|
committer | Richard Linden <none@none> | 2012-03-06 16:59:11 -0800 |
commit | bea2dfbc22bb2d80755dcf9daf810e1ea0329c2d (patch) | |
tree | 7f35e2256ee2251be613697cc23c7f0eff59ea49 /indra/llui/lllayoutstack.cpp | |
parent | 93aa231a18b9b5c9b3ab2ff162fa4928ac60d62b (diff) |
EXP-1767 WIP Received Items panel state does not persist between sessions
added get/setTargetDim() for managing layout_panel size even if its collapsed/invisible/etc
Diffstat (limited to 'indra/llui/lllayoutstack.cpp')
-rw-r--r-- | indra/llui/lllayoutstack.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 988595f72a..4c730286da 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -113,7 +113,26 @@ S32 LLLayoutPanel::getLayoutDim() const ? getRect().getWidth() : getRect().getHeight())); } - + +S32 LLLayoutPanel::getTargetDim() const +{ + return mTargetDim; +} + +void LLLayoutPanel::setTargetDim(S32 value) +{ + LLRect new_rect(getRect()); + if (mOrientation == LLLayoutStack::HORIZONTAL) + { + new_rect.mRight = new_rect.mLeft + value; + } + else + { + new_rect.mTop = new_rect.mBottom + value; + } + setShape(new_rect, true); +} + S32 LLLayoutPanel::getVisibleDim() const { F32 min_dim = getRelevantMinDim(); |