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
meow-7.2.2
Dmitry Zaporozhan 2009-12-25 14:38:49 +02:00
parent 0312156258
commit 5d5d9ee7fa
2 changed files with 10 additions and 8 deletions

View File

@ -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);

View File

@ -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"
/>