diff options
author | Oz Linden <oz@lindenlab.com> | 2011-01-28 11:36:46 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-01-28 11:36:46 -0500 |
commit | 98140b3cdcd505aabe31fcd23db7a2603c8deed3 (patch) | |
tree | b94c39ef7afbc4a091b1e4f2f7b4b2de599831a8 /indra/newview/lltexturectrl.cpp | |
parent | 106c9124741afd50c3aaa5671743d5a939f1ad48 (diff) | |
parent | 4b354802c10e6e947a0ce0f023158e22fcd5bc4b (diff) |
merge changes for storm-634
Diffstat (limited to 'indra/newview/lltexturectrl.cpp')
-rw-r--r-- | indra/newview/lltexturectrl.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 328298bda4..56e9739350 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -564,25 +564,27 @@ void LLFloaterTexturePicker::draw() LLRect interior = border; interior.stretch( -1 ); + // If the floater is focused, don't apply its alpha to the texture (STORM-677). + const F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency(); if( mTexturep ) { if( mTexturep->getComponents() == 4 ) { - gl_rect_2d_checkerboard( interior ); + gl_rect_2d_checkerboard( interior, alpha ); } - gl_draw_scaled_image( interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), mTexturep ); + gl_draw_scaled_image( interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), mTexturep, UI_VERTEX_COLOR % alpha ); // Pump the priority mTexturep->addTextureStats( (F32)(interior.getWidth() * interior.getHeight()) ); } else if (!mFallbackImage.isNull()) { - mFallbackImage->draw(interior); + mFallbackImage->draw(interior, UI_VERTEX_COLOR % alpha); } else { - gl_rect_2d( interior, LLColor4::grey, TRUE ); + gl_rect_2d( interior, LLColor4::grey % alpha, TRUE ); // Draw X gl_draw_x(interior, LLColor4::black ); @@ -1263,23 +1265,25 @@ void LLTextureCtrl::draw() LLRect interior = border; interior.stretch( -1 ); + // If we're in a focused floater, don't apply the floater's alpha to the texture (STORM-677). + const F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency(); if( mTexturep ) { if( mTexturep->getComponents() == 4 ) { - gl_rect_2d_checkerboard( interior ); + gl_rect_2d_checkerboard( interior, alpha ); } - gl_draw_scaled_image( interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), mTexturep); + gl_draw_scaled_image( interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), mTexturep, UI_VERTEX_COLOR % alpha); mTexturep->addTextureStats( (F32)(interior.getWidth() * interior.getHeight()) ); } else if (!mFallbackImage.isNull()) { - mFallbackImage->draw(interior); + mFallbackImage->draw(interior, UI_VERTEX_COLOR % alpha); } else { - gl_rect_2d( interior, LLColor4::grey, TRUE ); + gl_rect_2d( interior, LLColor4::grey % alpha, TRUE ); // Draw X gl_draw_x( interior, LLColor4::black ); |