summaryrefslogtreecommitdiff
path: root/indra/llui/llbadge.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2018-01-12 19:22:37 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2018-01-12 19:22:37 +0200
commitee1b6e853ce4d6d5993184a54b6ba312addb1c1f (patch)
treee5c44038fe1ecf79e43448382058c6dde5b1326d /indra/llui/llbadge.cpp
parent56c878925af77324e2e85db2203cc82b86693664 (diff)
MAINT-8171 "New" tag is not in front of folder when searching items in "Received Items" panel
Diffstat (limited to 'indra/llui/llbadge.cpp')
-rw-r--r--indra/llui/llbadge.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/llui/llbadge.cpp b/indra/llui/llbadge.cpp
index 15b6899d74..589b75ab5b 100644
--- a/indra/llui/llbadge.cpp
+++ b/indra/llui/llbadge.cpp
@@ -102,6 +102,7 @@ LLBadge::LLBadge(const LLBadge::Params& p)
, mPaddingHoriz(p.padding_horiz)
, mPaddingVert(p.padding_vert)
, mParentScroller(NULL)
+ , mDrawAtParentTop(false)
{
if (mImage.isNull())
{
@@ -307,7 +308,14 @@ void LLBadge::draw()
// Compute y position
if (mLocationOffsetVCenter == BADGE_OFFSET_NOT_SPECIFIED)
{
- badge_center_y = owner_rect.mBottom + owner_rect.getHeight() * mLocationPercentVCenter;
+ if(mDrawAtParentTop)
+ {
+ badge_center_y = owner_rect.mTop - badge_height * 0.5f - 1;
+ }
+ else
+ {
+ badge_center_y = owner_rect.mBottom + owner_rect.getHeight() * mLocationPercentVCenter;
+ }
}
else
{