Touchups to scroll list building

Moved handling of mouse_wheel_opaque and menu_file to setScrollListParameters
Removed setToolTip block from LLScrollListCtrl::fromXML since setToolTip lives inside of LLView::initFromXML which is called by LLUICtrl::initFromXML which was already called at this point
Added support for building columns from xml with relative_width which is synonymous with relwidth
Fixed namelist columns not supporting dynamic_width in xml (dynamicwidth is only acceptable in older xmls)
This commit is contained in:
Inusaito Sayori
2013-07-27 16:40:26 -04:00
parent 6088ed50a8
commit 2b2a6d5ea6
2 changed files with 30 additions and 20 deletions

View File

@@ -360,11 +360,23 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto
std::string sortname(columnname);
child->getAttributeString("sort", sortname);
if (child->hasAttribute("relwidth"))
if (child->hasAttribute("relative_width"))
{
F32 columnrelwidth = 0.f;
child->getAttributeF32("relative_width", columnrelwidth);
columns[index]["relative_width"] = columnrelwidth;
}
else if (child->hasAttribute("relwidth"))
{
F32 columnrelwidth = 0.f;
child->getAttributeF32("relwidth", columnrelwidth);
columns[index]["relwidth"] = columnrelwidth;
columns[index]["relative_width"] = columnrelwidth;
}
else if (child->hasAttribute("dynamic_width"))
{
BOOL columndynamicwidth = FALSE;
child->getAttributeBOOL("dynamic_width", columndynamicwidth);
columns[index]["dynamic_width"] = columndynamicwidth;
}
else if (child->hasAttribute("dynamicwidth"))
{