diff options
| author | Oz Linden <oz@lindenlab.com> | 2011-04-02 07:07:49 -0400 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2011-04-02 07:07:49 -0400 |
| commit | e58c809a5816383674d0f1957440fad728e88893 (patch) | |
| tree | 83f1ff2c4bee8237c4557793143b2133623943a4 /indra/llui/lliconctrl.cpp | |
| parent | f9af1f4fca028709b0262c0e8c40eefc2ab13d00 (diff) | |
| parent | e6c0615b97019cf9c8aee267513757c0c2510420 (diff) | |
merge changes for STORM-1131
Diffstat (limited to 'indra/llui/lliconctrl.cpp')
| -rw-r--r-- | indra/llui/lliconctrl.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/llui/lliconctrl.cpp b/indra/llui/lliconctrl.cpp index 627957061d..47f2cfaf89 100644 --- a/indra/llui/lliconctrl.cpp +++ b/indra/llui/lliconctrl.cpp @@ -41,6 +41,7 @@ static LLDefaultChildRegistry::Register<LLIconCtrl> r("icon"); LLIconCtrl::Params::Params() : image("image_name"), color("color"), + use_draw_context_alpha("use_draw_context_alpha", true), scale_image("scale_image") { tab_stop = false; @@ -51,6 +52,7 @@ LLIconCtrl::LLIconCtrl(const LLIconCtrl::Params& p) : LLUICtrl(p), mColor(p.color()), mImagep(p.image), + mUseDrawContextAlpha(p.use_draw_context_alpha), mPriority(0), mDrawWidth(0), mDrawHeight(0) @@ -71,7 +73,8 @@ void LLIconCtrl::draw() { if( mImagep.notNull() ) { - mImagep->draw(getLocalRect(), mColor.get() % getDrawContext().mAlpha ); + const F32 alpha = mUseDrawContextAlpha ? getDrawContext().mAlpha : getCurrentTransparency(); + mImagep->draw(getLocalRect(), mColor.get() % alpha ); } LLUICtrl::draw(); |
