#3897 Fix favorite's stars being hidden in some cases
parent
1f17536cc8
commit
207ef20e9e
|
|
@ -1693,6 +1693,11 @@ LLRect LLFolderView::getVisibleRect()
|
|||
return visible_rect;
|
||||
}
|
||||
|
||||
S32 LLFolderView::getVisibleContentWidth()
|
||||
{
|
||||
return (mScrollContainer ? mScrollContainer->getVisibleContentRect().getWidth() : 0);
|
||||
}
|
||||
|
||||
bool LLFolderView::getShowSelectionContext()
|
||||
{
|
||||
if (mShowSelectionContext)
|
||||
|
|
|
|||
|
|
@ -222,6 +222,7 @@ public:
|
|||
void scrollToShowItem(LLFolderViewItem* item, const LLRect& constraint_rect);
|
||||
void setScrollContainer( LLScrollContainer* parent ) { mScrollContainer = parent; }
|
||||
LLRect getVisibleRect();
|
||||
S32 getVisibleContentWidth();
|
||||
|
||||
bool search(LLFolderViewItem* first_item, const std::string &search_string, bool backward);
|
||||
void setShowSelectionContext(bool show) { mShowSelectionContext = show; }
|
||||
|
|
|
|||
|
|
@ -828,8 +828,14 @@ void LLFolderViewItem::drawFavoriteIcon()
|
|||
constexpr S32 PAD = 3;
|
||||
constexpr S32 image_size = 14;
|
||||
|
||||
S32 width = mRoot->getVisibleContentWidth(); // star should stick to scroller's right side
|
||||
if (width <= 0)
|
||||
{
|
||||
width = getRect().getWidth();
|
||||
}
|
||||
|
||||
gl_draw_scaled_image(
|
||||
getRect().getWidth() - image_size - PAD, getRect().getHeight() - mItemHeight + PAD,
|
||||
width - image_size - PAD, getRect().getHeight() - mItemHeight + PAD,
|
||||
image_size, image_size, favorite_image->getImage(), sFgColor);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue