STORM-687 FIXED Applied floater transparency to snapshot preview texture (unless the floater is focused, see STORM-676 to know why).
parent
77061c1939
commit
f6fba382fb
|
|
@ -128,6 +128,8 @@ void LLFloaterPostcard::draw()
|
|||
|
||||
if(!isMinimized() && mViewerImage.notNull() && mJPEGImage.notNull())
|
||||
{
|
||||
// Force the texture to be 100% opaque when the floater is focused.
|
||||
F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency();
|
||||
LLRect rect(getRect());
|
||||
|
||||
// first set the max extents of our preview
|
||||
|
|
@ -149,7 +151,7 @@ void LLFloaterPostcard::draw()
|
|||
}
|
||||
{
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
gl_rect_2d(rect, LLColor4(0.f, 0.f, 0.f, 1.f));
|
||||
gl_rect_2d(rect, LLColor4(0.f, 0.f, 0.f, 1.f) % alpha);
|
||||
rect.stretch(-1);
|
||||
}
|
||||
{
|
||||
|
|
@ -164,7 +166,7 @@ void LLFloaterPostcard::draw()
|
|||
rect.getWidth(),
|
||||
rect.getHeight(),
|
||||
mViewerImage.get(),
|
||||
LLColor4::white);
|
||||
LLColor4::white % alpha);
|
||||
}
|
||||
glMatrixMode(GL_TEXTURE);
|
||||
glPopMatrix();
|
||||
|
|
|
|||
|
|
@ -2184,9 +2184,11 @@ void LLFloaterSnapshot::draw()
|
|||
S32 offset_y = thumbnail_rect.mBottom + (thumbnail_rect.getHeight() - previewp->getThumbnailHeight()) / 2 ;
|
||||
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
// Apply floater transparency to the texture unless the floater is focused.
|
||||
F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency();
|
||||
gl_draw_scaled_image(offset_x, offset_y,
|
||||
previewp->getThumbnailWidth(), previewp->getThumbnailHeight(),
|
||||
previewp->getThumbnailImage(), LLColor4::white);
|
||||
previewp->getThumbnailImage(), LLColor4::white % alpha);
|
||||
|
||||
previewp->drawPreviewRect(offset_x, offset_y) ;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue