diff options
Diffstat (limited to 'indra/llui/llbadge.cpp')
-rw-r--r-- | indra/llui/llbadge.cpp | 10 |
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 { |