summaryrefslogtreecommitdiff
path: root/indra/llui/llbadge.cpp
diff options
context:
space:
mode:
authorLeslie Linden <none@none>2011-06-09 12:12:28 -0700
committerLeslie Linden <none@none>2011-06-09 12:12:28 -0700
commitdef85f2778d9b69bc3fb0e89c1cef854a1c01886 (patch)
treebfae24f88d2a2679d5812a9684b33a5750d946c6 /indra/llui/llbadge.cpp
parent6e928645b94901518fe452ab7fab0278e87613d7 (diff)
EXP-865 FIX -- Modify LLBadge to allow it to hang off of non-buttons
LLBadgeOwner now only depends on LLView instead of LLUICtrl Sidebar Tab Buttons now can support badges Reviewed by Leyla
Diffstat (limited to 'indra/llui/llbadge.cpp')
-rw-r--r--indra/llui/llbadge.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/llui/llbadge.cpp b/indra/llui/llbadge.cpp
index e4c64e327e..53db226b20 100644
--- a/indra/llui/llbadge.cpp
+++ b/indra/llui/llbadge.cpp
@@ -178,16 +178,16 @@ void LLBadge::draw()
{
if (!mLabel.empty())
{
- LLUICtrl* owner_ctrl = mOwner.get();
+ LLView* owner_view = mOwner.get();
- if (owner_ctrl)
+ if (owner_view)
{
//
// Calculate badge position based on owner
//
LLRect owner_rect;
- owner_ctrl->localRectToOtherView(owner_ctrl->getLocalRect(), & owner_rect, this);
+ owner_view->localRectToOtherView(owner_view->getLocalRect(), & owner_rect, this);
F32 badge_center_x = owner_rect.mLeft + owner_rect.getWidth() * mLocationPercentHCenter;
F32 badge_center_y = owner_rect.mBottom + owner_rect.getHeight() * mLocationPercentVCenter;
@@ -230,7 +230,7 @@ void LLBadge::draw()
}
else
{
- lldebugs << "No image for badge " << getName() << " on owner " << owner_ctrl->getName() << llendl;
+ lldebugs << "No image for badge " << getName() << " on owner " << owner_view->getName() << llendl;
renderBadgeBackground(badge_center_x, badge_center_y,
badge_width, badge_height,