Addendum to previous commit: Create the textbox after the border to keep the order
parent
9d83d519cd
commit
70f096e9bb
|
|
@ -240,20 +240,6 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p)
|
|||
mScrollbar = LLUICtrlFactory::create<LLScrollbar> (sbparams);
|
||||
addChild(mScrollbar);
|
||||
|
||||
// <FS:Ansariel> addRow() will call updateLayout() that tries to access the the comment
|
||||
// textbox. So create it first before adding rows!
|
||||
LLTextBox::Params text_p;
|
||||
text_p.name("comment_text");
|
||||
text_p.border_visible(false);
|
||||
text_p.rect(mItemListRect);
|
||||
text_p.follows.flags(FOLLOWS_ALL);
|
||||
// word wrap was added accroding to the EXT-6841
|
||||
text_p.wrap(true);
|
||||
// set up label text color for empty lists in a way it's always readable -Zi
|
||||
text_p.text_color = mFgUnselectedColor;
|
||||
addChild(LLUICtrlFactory::create<LLTextBox>(text_p));
|
||||
// </FS:Ansariel>
|
||||
|
||||
// Border
|
||||
if (p.has_border)
|
||||
{
|
||||
|
|
@ -271,6 +257,20 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p)
|
|||
mBorder->reshape(getRect().getWidth(), getRect().getHeight());
|
||||
}
|
||||
|
||||
// <FS:Ansariel> addRow() will call updateLayout() that tries to access the the comment
|
||||
// textbox. So create it first before adding rows!
|
||||
LLTextBox::Params text_p;
|
||||
text_p.name("comment_text");
|
||||
text_p.border_visible(false);
|
||||
text_p.rect(mItemListRect);
|
||||
text_p.follows.flags(FOLLOWS_ALL);
|
||||
// word wrap was added accroding to the EXT-6841
|
||||
text_p.wrap(true);
|
||||
// set up label text color for empty lists in a way it's always readable -Zi
|
||||
text_p.text_color = mFgUnselectedColor;
|
||||
addChild(LLUICtrlFactory::create<LLTextBox>(text_p));
|
||||
// </FS:Ansariel>
|
||||
|
||||
if (p.sort_column >= 0)
|
||||
{
|
||||
sortByColumnIndex(p.sort_column, p.sort_ascending);
|
||||
|
|
|
|||
Loading…
Reference in New Issue