diff options
| -rw-r--r-- | indra/llui/lltexteditor.cpp | 26 | ||||
| -rw-r--r-- | indra/newview/llchathistory.cpp | 11 | ||||
| -rw-r--r-- | indra/newview/llpanelprofileview.cpp | 3 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_chat_header.xml | 7 | 
4 files changed, 28 insertions, 19 deletions
| diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 224f066968..3f4ef24f82 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -750,8 +750,10 @@ BOOL LLTextEditor::handleHover(S32 x, S32 y, MASK mask)  	{  		if( mIsSelecting )   		{ -			mScroller->autoScroll(x, y); - +			if(mScroller) +			{	 +				mScroller->autoScroll(x, y); +			}  			S32 clamped_x = llclamp(x, mTextRect.mLeft, mTextRect.mRight);  			S32 clamped_y = llclamp(y, mTextRect.mBottom, mTextRect.mTop);  			setCursorAtLocalPos( clamped_x, clamped_y, true ); @@ -799,7 +801,10 @@ BOOL LLTextEditor::handleMouseUp(S32 x, S32 y, MASK mask)  	{  		if( mIsSelecting )  		{ -			mScroller->autoScroll(x, y); +			if(mScroller) +			{ +				mScroller->autoScroll(x, y); +			}  			S32 clamped_x = llclamp(x, mTextRect.mLeft, mTextRect.mRight);  			S32 clamped_y = llclamp(y, mTextRect.mBottom, mTextRect.mTop);  			setCursorAtLocalPos( clamped_x, clamped_y, true ); @@ -1696,7 +1701,15 @@ BOOL LLTextEditor::handleKeyHere(KEY key, MASK mask )  	*/  	if (mReadOnly)  	{ -		handled = mScroller->handleKeyHere( key, mask ); +		if(mScroller) +		{ +			handled = mScroller->handleKeyHere( key, mask ); +		} +		else  +		{ +			handled = handleNavigationKey( key, mask ); +		} +  	}  	else  	{ @@ -2135,9 +2148,8 @@ void LLTextEditor::drawPreeditMarker()  void LLTextEditor::drawLineNumbers()  {  	LLGLSUIDefault gls_ui; - -	LLRect scrolled_view_rect = mScroller->getVisibleContentRect(); -	LLRect content_rect = mScroller->getContentWindowRect(); +	LLRect scrolled_view_rect = getVisibleDocumentRect(); +	LLRect content_rect = getTextRect();	  	LLLocalClipRect clip(content_rect);  	S32 first_line = getFirstVisibleLine();  	S32 num_lines = getLineCount(); diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index a95234099c..24fa28c6cd 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -33,12 +33,10 @@  #include "llviewerprecompiledheaders.h"  #include "llchathistory.h"  #include "llpanel.h" -#include "lltextbox.h" -#include "lltexteditor.h"  #include "lluictrlfactory.h"  #include "llscrollcontainer.h"  #include "llavatariconctrl.h" - +#include "lltexteditor.h"  #include "llimview.h"  #include "llcallingcard.h" //for LLAvatarTracker  #include "llagentdata.h" @@ -188,9 +186,8 @@ public:  		LLTextEditor* userName = getChild<LLTextEditor>("user_name"); -		LLUIColor color = style_params.color; -		userName->setReadOnlyColor(color); -		userName->setColor(color); +		userName->setReadOnlyColor(style_params.readonly_color()); +		userName->setColor(style_params.color());  		if(!chat.mFromName.empty())  		{ @@ -204,7 +201,7 @@ public:  		} -		LLTextBox* timeBox = getChild<LLTextBox>("time_box"); +		LLUICtrl* timeBox = getChild<LLUICtrl>("time_box");  		timeBox->setValue(chat.mTimeStr);  		LLAvatarIconCtrl* icon = getChild<LLAvatarIconCtrl>("avatar_icon"); diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp index c7c2484be3..bcf5b16aa6 100644 --- a/indra/newview/llpanelprofileview.cpp +++ b/indra/newview/llpanelprofileview.cpp @@ -43,7 +43,6 @@  #include "llpanelpicks.h"  #include "llpanelprofile.h"  #include "llsidetraypanelcontainer.h" -#include "lltexteditor.h"  static LLRegisterPanelClassWrapper<LLPanelProfileView> t_panel_target_profile("panel_profile_view"); @@ -191,7 +190,7 @@ void LLPanelProfileView::processOnlineStatus(bool online)  void LLPanelProfileView::onAvatarNameCached(const LLUUID& id, const std::string& first_name, const std::string& last_name, BOOL is_group)  {  	llassert(getAvatarId() == id); -	getChild<LLTextEditor>("user_name", FALSE)->setValue(first_name + " " + last_name); +	getChild<LLUICtrl>("user_name", FALSE)->setValue(first_name + " " + last_name);  }  void LLPanelProfileView::togglePanel(LLPanel* panel) diff --git a/indra/newview/skins/default/xui/en/panel_chat_header.xml b/indra/newview/skins/default/xui/en/panel_chat_header.xml index da175a75cd..692461b1a2 100644 --- a/indra/newview/skins/default/xui/en/panel_chat_header.xml +++ b/indra/newview/skins/default/xui/en/panel_chat_header.xml @@ -20,18 +20,19 @@           top="3"           width="18" />      <text_editor +	 v_pad = "0"  	 read_only = "true"       follows="left|right"  	 font.style="BOLD" -	 height="18" +	 height="12"  	 layout="topleft"  	 left_pad="5"       right="-50"       name="user_name"       text_color="white" -	 top="5" +	 top="8"  	 use_ellipses="true" -	 value="Erica Vader" /> +	 value="Ericag Vader" />      <text              font="SansSerifSmall"           follows="right" | 
