SOCIAL-822 FIX UI and Sizing issues with hints in Basic and Advanced modes
fixed crash for advanced modemaster
parent
878b0e2da1
commit
453b0c700a
|
|
@ -213,19 +213,22 @@ void LLHintPopup::draw()
|
|||
alpha = clamp_rescale(mFadeTimer.getElapsedTimeF32(), 0.f, mFadeInTime, 0.f, 1.f);
|
||||
}
|
||||
|
||||
LLIconCtrl& hint_icon = getChildRef<LLIconCtrl>("hint_image");
|
||||
LLIconCtrl* hint_icon = findChild<LLIconCtrl>("hint_image");
|
||||
|
||||
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();
|
||||
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();
|
||||
|
||||
S32 delta_height = image_height - hint_icon.getParent()->getParent()->getRect().getHeight();
|
||||
hint_icon.getParent()->reshape(image_width, hint_icon.getParent()->getRect().getHeight());
|
||||
hint_icon.getParent()->getParent()->reshape(hint_icon.getParent()->getParent()->getRect().getWidth(), image_height);
|
||||
hint_icon.getParent()->getParent()->translate(0, -delta_height);
|
||||
S32 delta_height = image_height - hint_icon.getParent()->getParent()->getRect().getHeight();
|
||||
hint_icon.getParent()->reshape(image_width, hint_icon.getParent()->getRect().getHeight());
|
||||
hint_icon.getParent()->getParent()->reshape(hint_icon.getParent()->getParent()->getRect().getWidth(), image_height);
|
||||
hint_icon.getParent()->getParent()->translate(0, -delta_height);
|
||||
|
||||
LLRect hint_rect = getLocalRect();
|
||||
reshape(hint_rect.getWidth(), hint_rect.getHeight() + delta_height);
|
||||
LLRect hint_rect = getLocalRect();
|
||||
reshape(hint_rect.getWidth(), hint_rect.getHeight() + delta_height);
|
||||
}
|
||||
|
||||
{ LLViewDrawContext context(alpha);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue