From 06025b4390c3ab6c47aa895afe18e1bbf559f188 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 10 Jun 2011 19:06:20 -0700 Subject: Show tooltips on profile pick tabs (lousy workaround for most names being too big too fit) --- linden/indra/llui/lltabcontainer.h | 10 +++++++--- linden/indra/newview/llpanelavatar.cpp | 9 +++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'linden') diff --git a/linden/indra/llui/lltabcontainer.h b/linden/indra/llui/lltabcontainer.h index 8117cde..989b12c 100644 --- a/linden/indra/llui/lltabcontainer.h +++ b/linden/indra/llui/lltabcontainer.h @@ -145,7 +145,6 @@ public: static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); -private: // Structure used to map tab buttons to and from tab panels struct LLTabTuple { @@ -176,11 +175,12 @@ private: LLTextBox* mPlaceholderText; S32 mPadding; }; - - void initButtons(); LLTabTuple* getTab(S32 index) { return mTabList[index]; } LLTabTuple* getTabByPanel(LLPanel* child); + + LLTextBox* getTitle() { return mTitleBox; } + void insertTuple(LLTabTuple * tuple, eInsertionPoint insertion_point); S32 getScrollPos() const { return mScrollPos; } @@ -195,6 +195,10 @@ private: void setCurrentPanelIndex(S32 index) { mCurrentTabIdx = index; } +private: + + void initButtons(); + void scrollPrev() { mScrollPos = llmax(0, mScrollPos-1); } // No wrap void scrollNext() { mScrollPos = llmin(mScrollPos+1, mMaxScrollPos); } // No wrap diff --git a/linden/indra/newview/llpanelavatar.cpp b/linden/indra/newview/llpanelavatar.cpp index 0a668ba..dc0db8b 100644 --- a/linden/indra/newview/llpanelavatar.cpp +++ b/linden/indra/newview/llpanelavatar.cpp @@ -1004,6 +1004,15 @@ void LLPanelAvatarPicks::refresh() childSetVisible("Delete...", self && getPanelAvatar()->isEditable()); sendAvatarProfileRequestIfNeeded("avatarpicksrequest"); + + for (int i = 0; i < tab_count; ++i) + { + LLTabContainer::LLTabTuple* tab = tabs->getTab(i); + if (tab) + { + tab->mButton->setToolTip(tabs->getPanelTitle(i)); + } + } } -- cgit v1.1