diff options
Diffstat (limited to 'linden/indra/llui/llpanel.cpp')
-rw-r--r-- | linden/indra/llui/llpanel.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/linden/indra/llui/llpanel.cpp b/linden/indra/llui/llpanel.cpp index 92d045d..28780c7 100644 --- a/linden/indra/llui/llpanel.cpp +++ b/linden/indra/llui/llpanel.cpp | |||
@@ -1085,11 +1085,15 @@ struct LLLayoutStack::LLEmbeddedPanel | |||
1085 | { | 1085 | { |
1086 | if (mOrientation == HORIZONTAL) | 1086 | if (mOrientation == HORIZONTAL) |
1087 | { | 1087 | { |
1088 | return mVisibleAmt * clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, (F32)mMinWidth / (F32)mPanel->getRect().getWidth()); | 1088 | F32 collapse_amt = |
1089 | clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, (F32)mMinWidth / (F32)llmax(1, mPanel->getRect().getWidth())); | ||
1090 | return mVisibleAmt * collapse_amt; | ||
1089 | } | 1091 | } |
1090 | else | 1092 | else |
1091 | { | 1093 | { |
1092 | return mVisibleAmt * clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, (F32)mMinHeight / (F32)mPanel->getRect().getHeight()); | 1094 | F32 collapse_amt = |
1095 | clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, llmin(1.f, (F32)mMinHeight / (F32)llmax(1, mPanel->getRect().getHeight()))); | ||
1096 | return mVisibleAmt * collapse_amt; | ||
1093 | } | 1097 | } |
1094 | } | 1098 | } |
1095 | 1099 | ||