summaryrefslogtreecommitdiff
path: root/indra/newview/llhints.cpp
diff options
context:
space:
mode:
authorPaul ProductEngine <pguslisty@productengine.com>2011-04-14 15:16:15 +0300
committerPaul ProductEngine <pguslisty@productengine.com>2011-04-14 15:16:15 +0300
commit8636ed0db750f624d03470232c7d03122a120c7d (patch)
treee7d3518693796708c12977b21b15cf4e852211fb /indra/newview/llhints.cpp
parentc4f03ca949c25b6fd5794ebada5c5e65154a33c0 (diff)
parent88a7262340f2fc5085f4ac6600790518d01292d6 (diff)
merge
Diffstat (limited to 'indra/newview/llhints.cpp')
-rw-r--r--indra/newview/llhints.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/llhints.cpp b/indra/newview/llhints.cpp
index c4dcaf11f9..e15862e2a4 100644
--- a/indra/newview/llhints.cpp
+++ b/indra/newview/llhints.cpp
@@ -191,6 +191,8 @@ BOOL LLHintPopup::postBuild()
LLRect text_bounds = hint_text.getTextBoundingRect();
S32 delta_height = text_bounds.getHeight() - hint_text.getRect().getHeight();
reshape(getRect().getWidth(), getRect().getHeight() + delta_height);
+ hint_text.reshape(hint_text.getRect().getWidth(), hint_text.getRect().getHeight() + delta_height);
+// hint_text.translate(0, -delta_height);
return TRUE;
}
@@ -211,6 +213,24 @@ void LLHintPopup::draw()
alpha = clamp_rescale(mFadeTimer.getElapsedTimeF32(), 0.f, mFadeInTime, 0.f, 1.f);
}
+ LLIconCtrl* hint_icon = findChild<LLIconCtrl>("hint_image");
+
+ if (hint_icon)
+ {
+ LLUIImagePtr hint_image = hint_icon->getImage();
+ S32 image_height = hint_image.isNull() ? 0 : hint_image->getHeight();
+ S32 image_width = hint_image.isNull() ? 0 : hint_image->getWidth();
+
+ LLView* layout_stack = hint_icon->getParent()->getParent();
+ S32 delta_height = image_height - layout_stack->getRect().getHeight();
+ hint_icon->getParent()->reshape(image_width, hint_icon->getParent()->getRect().getHeight());
+ layout_stack->reshape(layout_stack->getRect().getWidth(), image_height);
+ layout_stack->translate(0, -delta_height);
+
+ LLRect hint_rect = getLocalRect();
+ reshape(hint_rect.getWidth(), hint_rect.getHeight() + delta_height);
+ }
+
{ LLViewDrawContext context(alpha);
if (mTarget.empty())