diff options
| author | maxim_productengine <mnikolenko@productengine.com> | 2019-05-02 13:45:40 +0300 | 
|---|---|---|
| committer | maxim_productengine <mnikolenko@productengine.com> | 2019-05-02 13:45:40 +0300 | 
| commit | f67fe8fce7d84bc8687d409311518565d97a5fc5 (patch) | |
| tree | 372143cca4eb637ff05413e4c144d216c5ec4455 | |
| parent | be0c609eaf48fe876b47ac94627c9237c457348a (diff) | |
SL-10833 Restore missing code after a merge
| -rw-r--r-- | indra/llui/lllineeditor.cpp | 71 | 
1 files changed, 38 insertions, 33 deletions
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index f1914ee9c5..de6bb23783 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -1690,39 +1690,44 @@ void LLLineEditor::doDelete()  } -void LLLineEditor::drawBackground() -{ -	bool has_focus = hasFocus(); -	LLUIImage* image; -	if ( mReadOnly ) -	{ -		image = mBgImageDisabled; -	} -	else if ( has_focus || mShowImageFocused) -	{ -		image = mBgImageFocused; -	} -	else -	{ -		image = mBgImage; -	} - -	if (!image) return; -	 -	F32 alpha = getCurrentTransparency(); - -	// optionally draw programmatic border -	if (has_focus) -	{ -		LLColor4 tmp_color = gFocusMgr.getFocusColor(); -		tmp_color.setAlpha(alpha); -		image->drawBorder(0, 0, getRect().getWidth(), getRect().getHeight(), -						  tmp_color, -						  gFocusMgr.getFocusFlashWidth()); -	} -	LLColor4 tmp_color = UI_VERTEX_COLOR; -	tmp_color.setAlpha(alpha); -	image->draw(getLocalRect(), tmp_color); +void LLLineEditor::drawBackground()
 +{
 +	F32 alpha = getCurrentTransparency();
 +	if (mUseBgColor)
 +	{
 +		gl_rect_2d(getLocalRect(), mBgColor % alpha, TRUE);
 +	}
 +	else
 +	{
 +		bool has_focus = hasFocus();
 +		LLUIImage* image;
 +		if (mReadOnly)
 +		{
 +			image = mBgImageDisabled;
 +		}
 +		else if (has_focus || mShowImageFocused)
 +		{
 +			image = mBgImageFocused;
 +		}
 +		else
 +		{
 +			image = mBgImage;
 +		}
 +
 +		if (!image) return;
 +		// optionally draw programmatic border
 +		if (has_focus)
 +		{
 +			LLColor4 tmp_color = gFocusMgr.getFocusColor();
 +			tmp_color.setAlpha(alpha);
 +			image->drawBorder(0, 0, getRect().getWidth(), getRect().getHeight(),
 +				tmp_color,
 +				gFocusMgr.getFocusFlashWidth());
 +		}
 +		LLColor4 tmp_color = UI_VERTEX_COLOR;
 +		tmp_color.setAlpha(alpha);
 +		image->draw(getLocalRect(), tmp_color);
 +	}
  }  void LLLineEditor::draw()  | 
