diff options
author | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-12-25 14:38:49 +0200 |
---|---|---|
committer | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-12-25 14:38:49 +0200 |
commit | 5d5d9ee7fa6a5bbe0b4573088c9e79e33e299999 (patch) | |
tree | 146ed690844d76aef9cec1ce1f50a0834b9e2cd4 /indra | |
parent | 0312156258f962108ce485c4be95992555b09b32 (diff) |
Fixed low sub task EXT-3451 - Code cleanup: Get Rid of Magic constants in LLChicletPanel::Params::Params (move into widget xml).
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llchiclet.cpp | 11 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/widgets/chiclet_panel.xml | 7 |
2 files changed, 10 insertions, 8 deletions
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 154a711431..2719f10a3d 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -1131,14 +1131,6 @@ LLChicletPanel::Params::Params() , scrolling_offset("scrolling_offset") , min_width("min_width") { - chiclet_padding = 3; - scrolling_offset = 40; - - if (!min_width.isProvided()) - { - // min_width = 4 chiclets + 3 paddings - min_width = 180 + 3*chiclet_padding; - } }; LLChicletPanel::LLChicletPanel(const Params&p) @@ -1151,6 +1143,9 @@ LLChicletPanel::LLChicletPanel(const Params&p) , mMinWidth(p.min_width) , mShowControls(true) { + // min_width = 4 chiclets + 3 paddings + mMinWidth += 3 * mChicletPadding; + LLPanel::Params panel_params; panel_params.follows.flags(FOLLOWS_LEFT | FOLLOWS_RIGHT); mScrollArea = LLUICtrlFactory::create<LLPanel>(panel_params,this); diff --git a/indra/newview/skins/default/xui/en/widgets/chiclet_panel.xml b/indra/newview/skins/default/xui/en/widgets/chiclet_panel.xml new file mode 100644 index 0000000000..d8cf1b9815 --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/chiclet_panel.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<chiclet_panel + name="chiclet_panel" + chiclet_padding="3" + scrolling_offset="40" + min_width="180" + />
\ No newline at end of file |