Merged in andreyl_productengine/viewer-neko-marchcat (pull request #385)

MAINT-7790 Fixed vertical image alignment for buttons

Approved-by: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Approved-by: Simon Linden <simon@lindenlab.com>
Andrey Lihatskiy 2017-09-25 16:54:56 +00:00
commit 486297b876
1 changed files with 5 additions and 3 deletions

View File

@ -808,11 +808,12 @@ void LLButton::draw()
}
else
{
imagep->draw(0, 0, (enabled ? mImageColor.get() : disabled_color) % alpha );
S32 y = getLocalRect().getHeight() - imagep->getHeight();
imagep->draw(0, y, (enabled ? mImageColor.get() : disabled_color) % alpha);
if (mCurGlowStrength > 0.01f)
{
gGL.setSceneBlendType(glow_type);
imagep->drawSolid(0, 0, glow_color % (mCurGlowStrength * alpha));
imagep->drawSolid(0, y, glow_color % (mCurGlowStrength * alpha));
gGL.setSceneBlendType(LLRender::BT_ALPHA);
}
}
@ -954,7 +955,8 @@ void LLButton::drawBorder(LLUIImage* imagep, const LLColor4& color, S32 size)
}
else
{
imagep->drawBorder(0, 0, color, size);
S32 y = getLocalRect().getHeight() - imagep->getHeight();
imagep->drawBorder(0, y, color, size);
}
}