diff options
author | Jacek Antonelli | 2009-05-24 02:59:02 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-05-24 02:59:08 -0500 |
commit | 811454f47ea1f3c5cb8971f0fed0959b18bd0747 (patch) | |
tree | 1b8689df2dc8857cdc5a956a5233d5bf94b5c8d7 /linden/indra/llui/llpanel.cpp | |
parent | Second Life viewer sources 1.23.0-RC (diff) | |
download | meta-impy-811454f47ea1f3c5cb8971f0fed0959b18bd0747.zip meta-impy-811454f47ea1f3c5cb8971f0fed0959b18bd0747.tar.gz meta-impy-811454f47ea1f3c5cb8971f0fed0959b18bd0747.tar.bz2 meta-impy-811454f47ea1f3c5cb8971f0fed0959b18bd0747.tar.xz |
Second Life viewer sources 1.23.1-RC
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 | ||