diff options
author | Adam Moss <moss@lindenlab.com> | 2009-05-22 09:58:47 +0000 |
---|---|---|
committer | Adam Moss <moss@lindenlab.com> | 2009-05-22 09:58:47 +0000 |
commit | 9dfe0ca9a0228c4fa75c8a3e51840696cc6b4960 (patch) | |
tree | 3136e0a32cdcb1d55a4c3a5a67791ca128d947a5 /indra/llui/llpanel.cpp | |
parent | 93cf3d89e51835dd2f61c32b16191ab724528055 (diff) |
svn merge -r121194:121210
svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer-1.23.onetwo-merge-1
QAR-1531 viewer 1.23rc1+1.23rc2 merge to trunk
Diffstat (limited to 'indra/llui/llpanel.cpp')
-rw-r--r-- | indra/llui/llpanel.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index 92d045d114..28780c7adb 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -1085,11 +1085,15 @@ struct LLLayoutStack::LLEmbeddedPanel { if (mOrientation == HORIZONTAL) { - return mVisibleAmt * clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, (F32)mMinWidth / (F32)mPanel->getRect().getWidth()); + F32 collapse_amt = + clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, (F32)mMinWidth / (F32)llmax(1, mPanel->getRect().getWidth())); + return mVisibleAmt * collapse_amt; } else { - return mVisibleAmt * clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, (F32)mMinHeight / (F32)mPanel->getRect().getHeight()); + F32 collapse_amt = + clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, llmin(1.f, (F32)mMinHeight / (F32)llmax(1, mPanel->getRect().getHeight()))); + return mVisibleAmt * collapse_amt; } } |