Skip to content
Snippets Groups Projects
Commit bea2dfbc authored by Richard Linden's avatar Richard Linden
Browse files

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
parent 93aa231a
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
......@@ -155,6 +155,8 @@ friend class LLUICtrlFactory;
void setVisible(BOOL visible);
S32 getLayoutDim() const;
S32 getTargetDim() const;
void setTargetDim(S32 value);
S32 getMinDim() const { return llmax(0, mMinDim); }
void setMinDim(S32 value) { mMinDim = value; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment