From e997a09343ad2a1f082b63c3bce83f9cd9566637 Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Wed, 24 Nov 2010 19:12:02 +0200 Subject: STORM-593 FIXED Make transparent texteditor and lineeditor Reason: If some child of transparent LLFloater has a visible non-transparent background then this part of floater is non-transparent. As a result floater became partially transparent. Solution: When transparent floater changes focus, iterate through its children and set corresponding (corresponding to whether control in active or in inactive floater see STORM-535) transparency value. - Added method LLUICtrl::getCurrentTransparency. This method calculates transparency level of a control. Calculated value should be used as an alpha chennel value in case we want this control to be transparent. For now this method is used by LLFloater to adjust transparency of its children. - Added calculating of transparecny level for: LLLineEditor, LLTextBase, LLinventoryListItem, LLScrollContainer, LLScrollListCtrl, LLAccrodionCtrlTab. - Added method LLFlaoter::updateChildrenTransparency which updates transparency value of its children --- indra/llui/lltextbase.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llui/lltextbase.cpp') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 3f213ed13e..49537ef78f 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1005,6 +1005,7 @@ void LLTextBase::draw() if (mBGVisible) { + F32 alpha = getCurrentTransparency(); // clip background rect against extents, if we support scrolling LLRect bg_rect = mVisibleTextRect; if (mScroller) @@ -1016,7 +1017,7 @@ void LLTextBase::draw() : hasFocus() ? mFocusBgColor.get() : mWriteableBgColor.get(); - gl_rect_2d(doc_rect, bg_color, TRUE); + gl_rect_2d(doc_rect, bg_color % alpha, TRUE); } // draw document view -- cgit v1.2.3