summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRichard Linden <none@none>2010-11-23 16:25:27 -0800
committerRichard Linden <none@none>2010-11-23 16:25:27 -0800
commit0298a7e196529fd853143fff483037e882df0a3d (patch)
tree419f47f58dbc6b3f87dd2ac17fdf67e33c0dafde /indra
parentbf55e74784f95cc514b140ac054c09b81bb977a7 (diff)
parentf8d08af9f1e810c977626e4131baf771d2b3655c (diff)
merge
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/lllayoutstack.cpp8
-rw-r--r--indra/llui/lllayoutstack.h20
-rw-r--r--indra/newview/llchathistory.cpp2
-rw-r--r--indra/newview/llmediactrl.cpp8
4 files changed, 26 insertions, 12 deletions
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index 3f56ec2c3d..6c0a2a9a10 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -38,6 +38,12 @@
static LLDefaultChildRegistry::Register<LLLayoutStack> register_layout_stack("layout_stack");
static LLLayoutStack::LayoutStackRegistry::Register<LLLayoutPanel> register_layout_panel("layout_panel");
+void LLLayoutStack::OrientationNames::declareValues()
+{
+ declare("horizontal", HORIZONTAL);
+ declare("vertical", VERTICAL);
+}
+
//
// LLLayoutPanel
//
@@ -107,7 +113,7 @@ LLLayoutStack::LLLayoutStack(const LLLayoutStack::Params& p)
mMinWidth(0),
mMinHeight(0),
mPanelSpacing(p.border_size),
- mOrientation((p.orientation() == "vertical") ? VERTICAL : HORIZONTAL),
+ mOrientation(p.orientation),
mAnimate(p.animate),
mAnimatedThisFrame(false),
mClip(p.clip)
diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h
index e19ef403ef..9e8539c716 100644
--- a/indra/llui/lllayoutstack.h
+++ b/indra/llui/lllayoutstack.h
@@ -37,12 +37,24 @@ class LLLayoutPanel;
class LLLayoutStack : public LLView, public LLInstanceTracker<LLLayoutStack>
{
public:
+ typedef enum e_layout_orientation
+ {
+ HORIZONTAL,
+ VERTICAL
+ } ELayoutOrientation;
+
+ struct OrientationNames
+ : public LLInitParam::TypeValuesHelper<ELayoutOrientation, OrientationNames>
+ {
+ static void declareValues();
+ };
+
struct LayoutStackRegistry : public LLChildRegistry<LayoutStackRegistry>
{};
struct Params : public LLInitParam::Block<Params, LLView::Params>
{
- Mandatory<std::string> orientation;
+ Mandatory<ELayoutOrientation, OrientationNames> orientation;
Optional<S32> border_size;
Optional<bool> animate,
clip;
@@ -52,12 +64,6 @@ public:
typedef LayoutStackRegistry child_registry_t;
- typedef enum e_layout_orientation
- {
- HORIZONTAL,
- VERTICAL
- } ELayoutOrientation;
-
virtual ~LLLayoutStack();
/*virtual*/ void draw();
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 271ee0c4a4..e933770601 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -586,7 +586,7 @@ void LLChatHistory::initFromParams(const LLChatHistory::Params& p)
LLLayoutStack::Params layout_p;
layout_p.rect = stack_rect;
layout_p.follows.flags = FOLLOWS_ALL;
- layout_p.orientation = "vertical";
+ layout_p.orientation = LLLayoutStack::VERTICAL;
layout_p.mouse_opaque = false;
LLLayoutStack* stackp = LLUICtrlFactory::create<LLLayoutStack>(layout_p, this);
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index cdbcee2668..54c7d361b7 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -70,7 +70,9 @@ public:
Params()
: bg_image("bg_image")
- {}
+ {
+ mouse_opaque = false;
+ }
};
void show();
@@ -107,7 +109,7 @@ void LLWindowShade::initFromParams(const LLWindowShade::Params& params)
layout_p.rect = LLRect(0,getLocalRect().mTop,getLocalRect().mRight, 30);
layout_p.follows.flags = FOLLOWS_ALL;
layout_p.mouse_opaque = false;
- layout_p.orientation = "vertical";
+ layout_p.orientation = LLLayoutStack::VERTICAL;
LLLayoutStack* stackp = LLUICtrlFactory::create<LLLayoutStack>(layout_p);
addChild(stackp);
@@ -133,7 +135,7 @@ void LLWindowShade::initFromParams(const LLWindowShade::Params& params)
layout_p = LLUICtrlFactory::getDefaultParams<LLLayoutStack>();
layout_p.rect = LLRect(0, 30, 800, 0);
layout_p.follows.flags = FOLLOWS_ALL;
- layout_p.orientation = "horizontal";
+ layout_p.orientation = LLLayoutStack::HORIZONTAL;
stackp = LLUICtrlFactory::create<LLLayoutStack>(layout_p);
notification_panel->addChild(stackp);