diff options
author | Anchor Linden <anchor@lindenlab.com> | 2018-05-21 16:47:42 -0700 |
---|---|---|
committer | Anchor Linden <anchor@lindenlab.com> | 2018-05-21 16:47:42 -0700 |
commit | 0fdbe7e34df55ac92302b4af38c42d03454d3bc1 (patch) | |
tree | 038c6087299c9096ac7c6606ec45a8339eb0fd72 /indra/llui/llbadge.cpp | |
parent | 3bf89821d9c9777a0f24d89280bd7a7011a7a3df (diff) | |
parent | c70119ebabc4b06e2b0db02aea8c56e01fbc666e (diff) |
Merge
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 { |