summaryrefslogtreecommitdiff
path: root/indra/llui/lllayoutstack.h
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-06-22 17:35:25 -0400
committerLeslie Linden <leslie@lindenlab.com>2011-06-22 17:35:25 -0400
commit4267014b146798cabe96568b2091c6bb2dd2b294 (patch)
tree47f15d6c3fcc25713a038655682ea60a0f982648 /indra/llui/lllayoutstack.h
parent21cc9a2868bc8260c7754df237e4abf1114be9e2 (diff)
EXP-890 FIX -- Resizing inbox or outbox to minimum size while open does not show present items when hte box is next opened
EXP-897 FIX -- Black box shown in UI when shrinking Inbox down in size * Layout panel now supports "expanded_min_dim" parameter which allows a different min size to be specified when the layout panel is collapsed vs expanded. * Inbox and Outbox expanded_min_dim attributes are now set to be larger than min dim so they can not be collapsed all the way when they are expanded.
Diffstat (limited to 'indra/llui/lllayoutstack.h')
-rw-r--r--indra/llui/lllayoutstack.h34
1 files changed, 27 insertions, 7 deletions
diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h
index 2fc2cf3eb4..d8ef0aeaca 100644
--- a/indra/llui/lllayoutstack.h
+++ b/indra/llui/lllayoutstack.h
@@ -30,10 +30,10 @@
#include "llpanel.h"
-class LLPanel;
class LLLayoutPanel;
+
class LLLayoutStack : public LLView, public LLInstanceTracker<LLLayoutStack>
{
public:
@@ -149,6 +149,7 @@ private:
F32 mCloseTimeConstant;
}; // end class LLLayoutStack
+
class LLLayoutPanel : public LLPanel
{
friend class LLLayoutStack;
@@ -156,13 +157,15 @@ friend class LLUICtrlFactory;
public:
struct Params : public LLInitParam::Block<Params, LLPanel::Params>
{
- Optional<S32> min_dim,
+ Optional<S32> expanded_min_dim,
+ min_dim,
max_dim;
Optional<bool> user_resize,
auto_resize;
Params()
- : min_dim("min_dim", 0),
+ : expanded_min_dim("expanded_min_dim", 0),
+ min_dim("min_dim", 0),
max_dim("max_dim", 0),
user_resize("user_resize", true),
auto_resize("auto_resize", true)
@@ -179,17 +182,34 @@ public:
void initFromParams(const Params& p);
S32 getMinDim() const { return mMinDim; }
- S32 getMaxDim() const { return mMaxDim; }
+ void setMinDim(S32 value) { mMinDim = value; if (!mExpandedMinDimSpecified) mExpandedMinDim = value; }
- void setMinDim(S32 value) { mMinDim = value; }
+ S32 getMaxDim() const { return mMaxDim; }
void setMaxDim(S32 value) { mMaxDim = value; }
-protected:
- LLLayoutPanel(const Params& p) ;
+ S32 getExpandedMinDim() const { return mExpandedMinDim; }
+ void setExpandedMinDim(S32 value) { mExpandedMinDim = value; mExpandedMinDimSpecified = true; }
+
+ S32 getRelevantMinDim() const
+ {
+ S32 min_dim = mMinDim;
+
+ if (!mCollapsed)
+ {
+ min_dim = mExpandedMinDim;
+ }
+
+ return min_dim;
+ }
+protected:
+ LLLayoutPanel(const Params& p);
F32 getCollapseFactor(LLLayoutStack::ELayoutOrientation orientation);
+ bool mExpandedMinDimSpecified;
+ S32 mExpandedMinDim;
+
S32 mMinDim;
S32 mMaxDim;
BOOL mAutoResize;