diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-12-07 14:56:36 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-12-07 14:56:36 -0500 |
commit | 6a59861bde42e1b8ddc8c19a0b37a2b0a7011f7a (patch) | |
tree | 7a6d04e723a71c33205cdfa9815006d45310657c /indra/newview/lltexturectrl.cpp | |
parent | 6a0c02c1b1e6ea3d84f06f2ab58402a98eece462 (diff) | |
parent | d9b4570883652d647c05083c18fac1a088efd6e2 (diff) |
Automated merge up from viewer-development
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 4588440aa1..1023a4339b 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -566,25 +566,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 ); @@ -1269,23 +1271,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 ); |