[LLScrollColumnHeader] Fix icons disappearing in certain states, such as click.
This commit is contained in:
@@ -40,8 +40,8 @@ const S32 MIN_COLUMN_WIDTH = 20;
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// LLScrollColumnHeader
|
// LLScrollColumnHeader
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
LLScrollColumnHeader::LLScrollColumnHeader(const std::string& name, const LLRect& rect, LLScrollListColumn* column)
|
LLScrollColumnHeader::LLScrollColumnHeader(const std::string& name, const LLRect& rect, LLScrollListColumn* column, const std::string& unselected_image_name, const std::string& selected_image_name)
|
||||||
: LLButton(name, rect, "square_btn_32x128.tga", "square_btn_selected_32x128.tga", LLStringUtil::null, NULL, LLFontGL::getFontSansSerifSmall()),
|
: LLButton(name, rect, unselected_image_name, selected_image_name, LLStringUtil::null, NULL, LLFontGL::getFontSansSerifSmall()),
|
||||||
mColumn(column),
|
mColumn(column),
|
||||||
mHasResizableElement(FALSE)
|
mHasResizableElement(FALSE)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class LLScrollListCtrl;
|
|||||||
class LLScrollColumnHeader : public LLButton
|
class LLScrollColumnHeader : public LLButton
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LLScrollColumnHeader(const std::string& name, const LLRect& rect, LLScrollListColumn* column);
|
LLScrollColumnHeader(const std::string& name, const LLRect& rect, LLScrollListColumn* column, const std::string& unselected_image_name = "square_btn_32x128.tga", const std::string& selected_image_name = "square_btn_selected_32x128.tga");
|
||||||
~LLScrollColumnHeader();
|
~LLScrollColumnHeader();
|
||||||
|
|
||||||
/*virtual*/ void draw();
|
/*virtual*/ void draw();
|
||||||
|
|||||||
@@ -2848,24 +2848,27 @@ void LLScrollListCtrl::addColumn(const LLScrollListColumn::Params& column_params
|
|||||||
|
|
||||||
LLRect temp_rect = LLRect(left,top+mHeadingHeight,right,top);
|
LLRect temp_rect = LLRect(left,top+mHeadingHeight,right,top);
|
||||||
|
|
||||||
new_column->mHeader = new LLScrollColumnHeader("btn_" + name, temp_rect, new_column);
|
if (column_params.header.image.isProvided())
|
||||||
new_column->mHeader->setToolTip(column_params.tool_tip());
|
|
||||||
new_column->mHeader->setTabStop(false);
|
|
||||||
new_column->mHeader->setVisible(mDisplayColumnHeaders);
|
|
||||||
|
|
||||||
if(column_params.header.image.isProvided())
|
|
||||||
{
|
{
|
||||||
new_column->mHeader->setImages(column_params.header.image, column_params.header.image);
|
new_column->mHeader = new LLScrollColumnHeader("btn_" + name, temp_rect, new_column, column_params.header.image, column_params.header.image);
|
||||||
}
|
|
||||||
else if(column_params.header.image_overlay.isProvided())
|
|
||||||
{
|
|
||||||
new_column->mHeader->setImageOverlay(column_params.header.image_overlay);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
new_column->mHeader->setLabel(column_params.header.label());
|
new_column->mHeader = new LLScrollColumnHeader("btn_" + name, temp_rect, new_column);
|
||||||
|
if (column_params.header.image_overlay.isProvided())
|
||||||
|
{
|
||||||
|
new_column->mHeader->setImageOverlay(column_params.header.image_overlay);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
new_column->mHeader->setLabel(column_params.header.label());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
new_column->mHeader->setToolTip(column_params.tool_tip());
|
||||||
|
new_column->mHeader->setTabStop(false);
|
||||||
|
new_column->mHeader->setVisible(mDisplayColumnHeaders);
|
||||||
|
|
||||||
addChild(new_column->mHeader);
|
addChild(new_column->mHeader);
|
||||||
|
|
||||||
sendChildToFront(mScrollbar);
|
sendChildToFront(mScrollbar);
|
||||||
|
|||||||
Reference in New Issue
Block a user