summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Lihatskiy <andreylproductengine@lindenlab.com>2017-09-25 16:54:56 +0000
committerAndrey Lihatskiy <andreylproductengine@lindenlab.com>2017-09-25 16:54:56 +0000
commit486297b87645f5c2c1483efe6fce16109a35004e (patch)
treeb5223aa790a59a292ddf9bc23942b3f408c1e40b
parentc8a932fa8a09a925c0cb3a0bc25e90456bb56d68 (diff)
parent818a0f7f774655d9fa58d3e1a452439e334aaf56 (diff)
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>
-rw-r--r--indra/llui/llbutton.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 8c7df45884..510a2537b9 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -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);
}
}