diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llpersonfolderview.cpp | 25 | ||||
| -rw-r--r-- | indra/newview/llpersontabview.cpp | 58 | ||||
| -rw-r--r-- | indra/newview/llpersontabview.h | 7 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/widgets/person_tab_view.xml | 4 | 
4 files changed, 77 insertions, 17 deletions
| diff --git a/indra/newview/llpersonfolderview.cpp b/indra/newview/llpersonfolderview.cpp index 97f5d5a03a..8141eecc35 100644 --- a/indra/newview/llpersonfolderview.cpp +++ b/indra/newview/llpersonfolderview.cpp @@ -47,21 +47,24 @@ LLPersonFolderView::~LLPersonFolderView()  BOOL LLPersonFolderView::handleMouseDown( S32 x, S32 y, MASK mask )  { -	LLFolderViewItem * prior_item = getCurSelectedItem(); -	LLFolderViewItem * current_item; +	LLFolderViewItem * item = getCurSelectedItem(); -	bool selected_item = LLFolderView::handleMouseDown(x, y, mask); - -	current_item = getCurSelectedItem(); -	 -	LLPersonTabView * prior_folder = dynamic_cast<LLPersonTabView *>(prior_item); - -	if(prior_folder && current_item != prior_folder) +	//Will disable highlight on tab +	if(item)  	{ -		prior_folder->highlight = false; +		LLPersonTabView * person_tab= dynamic_cast<LLPersonTabView *>(item); +		if(person_tab) +		{ +			person_tab->highlight = false; +		} +		else +		{ +			person_tab = dynamic_cast<LLPersonTabView *>(item->getParent()); +			person_tab->highlight = false; +		}  	} -	return selected_item; +	return LLFolderView::handleMouseDown(x, y, mask);  }  bool LLPersonFolderView::onConversationModelEvent(const LLSD &event) diff --git a/indra/newview/llpersontabview.cpp b/indra/newview/llpersontabview.cpp index 20db0572fc..3556878b91 100644 --- a/indra/newview/llpersontabview.cpp +++ b/indra/newview/llpersontabview.cpp @@ -38,9 +38,11 @@ LLPersonTabView::Params::Params()  LLPersonTabView::LLPersonTabView(const LLPersonTabView::Params& p) :  LLFolderViewFolder(p), -highlight(false) +highlight(false), +mImageHeader(LLUI::getUIImage("Accordion_Off")), +mImageHeaderOver(LLUI::getUIImage("Accordion_Over")), +mImageHeaderFocused(LLUI::getUIImage("Accordion_Selected"))  { -  }  S32 LLPersonTabView::getLabelXPos() @@ -73,7 +75,7 @@ void LLPersonTabView::draw()  	static LLUIColor sHighlightBgColor = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", DEFAULT_WHITE);  	static LLUIColor sFlashBgColor = LLUIColorTable::instance().getColor("MenuItemFlashBgColor", DEFAULT_WHITE);  	static LLUIColor sFocusOutlineColor = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", DEFAULT_WHITE); -	static LLUIColor sMouseOverColor = LLUIColorTable::instance().getColor("DkGray", DEFAULT_WHITE); +	  	const LLFontGL * font = LLFontGL::getFontSansSerif();  	F32 text_left = (F32)getLabelXPos(); @@ -81,8 +83,9 @@ void LLPersonTabView::draw()  	LLColor4 color = sFgColor;  	F32 right_x  = 0; -	drawHighlight(false, highlight, sHighlightBgColor, sFlashBgColor, sFocusOutlineColor, sMouseOverColor); +	//drawHighlight(false, highlight, sHighlightBgColor, sFlashBgColor, sFocusOutlineColor, sMouseOverColor); +	drawHighlight();  	updateLabelRotation();  	drawOpenFolderArrow(default_params, sFgColor); @@ -91,6 +94,53 @@ void LLPersonTabView::draw()  	LLView::draw();  } +void LLPersonTabView::drawHighlight() +{ +	S32 width = getRect().getWidth(); +	S32 height = mItemHeight; +	S32 x = 1; +	S32 y = getRect().getHeight() - mItemHeight; + +	//const S32 FOCUS_LEFT = 1; +	//const S32 focus_top = getRect().getHeight(); +	//const S32 focus_bottom = getRect().getHeight() - mItemHeight; +	//static LLUIColor bgColor = LLUIColorTable::instance().getColor("DkGray2", DEFAULT_WHITE); +	//static LLUIColor sMouseOverColor = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", DEFAULT_WHITE); + +	if(highlight) +	{ +		//reference will remove +		/*gl_rect_2d(FOCUS_LEFT, +			focus_top, +			getRect().getWidth() - 2, +			focus_bottom, +			sMouseOverColor, TRUE);*/ +		mImageHeaderFocused->draw(x,y,width,height); +	} +	else +	{ +		//reference will remove +		/*gl_rect_2d(FOCUS_LEFT, +			focus_top, +			getRect().getWidth() - 2, +			focus_bottom, +			bgColor, TRUE);*/ +		mImageHeader->draw(x,y,width,height); +	} + +	if(mIsMouseOverTitle) +	{ +		//reference will remove +		/*gl_rect_2d(FOCUS_LEFT, +			focus_top, +			getRect().getWidth() - 2, +			focus_bottom, +			sMouseOverColor, TRUE);*/ +		mImageHeaderOver->draw(x,y,width,height); +	} + +} +  //  // LLPersonView  //  diff --git a/indra/newview/llpersontabview.h b/indra/newview/llpersontabview.h index df3f786c69..35cb219ce2 100644 --- a/indra/newview/llpersontabview.h +++ b/indra/newview/llpersontabview.h @@ -50,8 +50,15 @@ public:  protected:	  	 void draw(); +	 void drawHighlight();  private: + +	// Background images +	LLPointer<LLUIImage> mImageHeader; +	LLPointer<LLUIImage> mImageHeaderOver; +	LLPointer<LLUIImage> mImageHeaderFocused; +  };  class LLPersonView : public LLFolderViewItem diff --git a/indra/newview/skins/default/xui/en/widgets/person_tab_view.xml b/indra/newview/skins/default/xui/en/widgets/person_tab_view.xml index 46857ac700..b36011763a 100644 --- a/indra/newview/skins/default/xui/en/widgets/person_tab_view.xml +++ b/indra/newview/skins/default/xui/en/widgets/person_tab_view.xml @@ -2,11 +2,11 @@  <conversation_view_session    folder_arrow_image="Folder_Arrow"    folder_indentation="5" -  item_height="20"  +  item_height="24"     item_top_pad="3"    mouse_opaque="true"    follows="left|top|right" -  text_pad="4" +  text_pad="5"    text_pad_left="4"    text_pad_right="4"    arrow_size="10" | 
