diff options
Diffstat (limited to 'indra/llui')
| -rw-r--r-- | indra/llui/llscrolllistcell.cpp | 4 | ||||
| -rw-r--r-- | indra/llui/llscrolllistcell.h | 5 | ||||
| -rw-r--r-- | indra/llui/llscrolllistctrl.h | 5 | 
3 files changed, 12 insertions, 2 deletions
| diff --git a/indra/llui/llscrolllistcell.cpp b/indra/llui/llscrolllistcell.cpp index 3cc92baa8d..d17be8b94a 100644 --- a/indra/llui/llscrolllistcell.cpp +++ b/indra/llui/llscrolllistcell.cpp @@ -185,6 +185,8 @@ LLScrollListText::LLScrollListText(const LLScrollListCell::Params& p)  {  	sCount++; +	mTextWidth = getWidth(); +  	// initialize rounded rect image  	if (!mRoundedRectImage)  	{ @@ -340,7 +342,7 @@ void LLScrollListText::draw(const LLColor4& color, const LLColor4& highlight_col  					0,  					LLFontGL::NO_SHADOW,  					string_chars,  -					getWidth(), +					getTextWidth(),  					&right_x,   					TRUE);  } diff --git a/indra/llui/llscrolllistcell.h b/indra/llui/llscrolllistcell.h index 5fecf5aade..b1c8901fc4 100644 --- a/indra/llui/llscrolllistcell.h +++ b/indra/llui/llscrolllistcell.h @@ -151,11 +151,16 @@ public:  	/*virtual*/ const std::string &	getToolTip() const;  	/*virtual*/ BOOL	needsToolTip() const; +	S32				getTextWidth() const { return mTextWidth;} +	void			setTextWidth(S32 value) { mTextWidth = value;}  +	virtual void	setWidth(S32 width) { LLScrollListCell::setWidth(width); mTextWidth = width; } +  	void			setText(const LLStringExplicit& text);  	void			setFontStyle(const U8 font_style);  private:  	LLUIString		mText; +	S32				mTextWidth;  	const LLFontGL*	mFont;  	LLColor4		mColor;  	U8				mUseColor; diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index e819c5fdea..ebdc82115f 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -219,7 +219,10 @@ public:  	void			deselectAllItems(BOOL no_commit_on_change = FALSE);	// by default, go ahead and commit on selection change  	void			clearHighlightedItems(); -	void			mouseOverHighlightNthItem( S32 index ); +	 +	virtual void	mouseOverHighlightNthItem( S32 index ); + +	S32				getHighlightedItemInx() const { return mHighlightedItem; }   	void			setDoubleClickCallback( callback_t cb ) { mOnDoubleClickCallback = cb; }  	void			setMaximumSelectCallback( callback_t cb) { mOnMaximumSelectCallback = cb; } | 
