summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorLeslie Linden <none@none>2011-05-25 10:39:34 -0700
committerLeslie Linden <none@none>2011-05-25 10:39:34 -0700
commit33e4a2c7b1ab3a06f1adb5edd9850523c897ea77 (patch)
tree3aefe803f9a40519442e068be8b17776e509673b /indra/llui
parent610b15aee47c5fae9df45b2d5ae515fd06b5a536 (diff)
Updated Marketplace Inbox & Outbox panel to maintain size when one is expanded vs the other
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/lllayoutstack.cpp18
-rw-r--r--indra/llui/lllayoutstack.h4
2 files changed, 13 insertions, 9 deletions
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index 9b6830a816..8a92796942 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -78,20 +78,20 @@ LLLayoutPanel::~LLLayoutPanel()
delete mResizeBar;
mResizeBar = NULL;
}
-
+
F32 LLLayoutPanel::getCollapseFactor(LLLayoutStack::ELayoutOrientation orientation)
{
if (orientation == LLLayoutStack::HORIZONTAL)
{
F32 collapse_amt =
- clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, (F32)mMinDim / (F32)llmax(1, getRect().getWidth()));
+ clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, (F32)mMinDim / (F32)llmax(1, getRect().getWidth()));
return mVisibleAmt * collapse_amt;
}
else
{
- F32 collapse_amt =
+ F32 collapse_amt =
clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, llmin(1.f, (F32)mMinDim / (F32)llmax(1, getRect().getHeight())));
- return mVisibleAmt * collapse_amt;
+ return mVisibleAmt * collapse_amt;
}
}
@@ -182,14 +182,14 @@ BOOL LLLayoutStack::postBuild()
}
bool LLLayoutStack::addChild(LLView* child, S32 tab_group)
- {
+{
LLLayoutPanel* panelp = dynamic_cast<LLLayoutPanel*>(child);
- if (panelp)
- {
+ if (panelp)
+ {
mPanels.push_back(panelp);
- }
+ }
return LLView::addChild(child, tab_group);
- }
+}
S32 LLLayoutStack::getDefaultHeight(S32 cur_height)
diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h
index 4ac8ef0ee9..2fc2cf3eb4 100644
--- a/indra/llui/lllayoutstack.h
+++ b/indra/llui/lllayoutstack.h
@@ -177,6 +177,10 @@ public:
~LLLayoutPanel();
void initFromParams(const Params& p);
+
+ S32 getMinDim() const { return mMinDim; }
+ S32 getMaxDim() const { return mMaxDim; }
+
void setMinDim(S32 value) { mMinDim = value; }
void setMaxDim(S32 value) { mMaxDim = value; }