From 58b9d27043b897fe73dbe3a3ea66fd4f6ca83033 Mon Sep 17 00:00:00 2001 From: Liny Date: Fri, 15 Mar 2013 11:41:50 -0700 Subject: [PATCH] Backed out changeset: d3a0a3d9e08f Vertical tabs dont scroll and this otherwise breaks scrolling of horizontal tabs in the first place --- indra/llui/lltabcontainer.cpp | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 51012b03a9..209df896f5 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -848,19 +848,27 @@ BOOL LLTabContainer::handleKeyHere(KEY key, MASK mask) // virtual BOOL LLTabContainer::handleScrollWheel(S32 x, S32 y, S32 clicks) { - if(!mIsVertical || 0 == getTabCount()) - { + if( 0 == getTabCount() ) return LLUICtrl::handleScrollWheel(x, y, clicks); - } LLTabTuple* firsttuple = getTab(0); static LLUICachedControl tabcntrv_pad ("UITabCntrvPad", 0); - bool has_scroll_arrows = (getMaxScrollPos() > 0); + BOOL has_scroll_arrows = (getMaxScrollPos() > 0); LLRect clip; - clip = LLRect(firsttuple->mButton->getRect().mLeft, - has_scroll_arrows ? mPrevArrowBtn->getRect().mBottom - tabcntrv_pad : mPrevArrowBtn->getRect().mTop, - firsttuple->mButton->getRect().mRight, - has_scroll_arrows ? mNextArrowBtn->getRect().mTop + tabcntrv_pad : mNextArrowBtn->getRect().mBottom ); + if (mIsVertical) + { + clip = LLRect(firsttuple->mButton->getRect().mLeft, + has_scroll_arrows ? mPrevArrowBtn->getRect().mBottom - tabcntrv_pad : mPrevArrowBtn->getRect().mTop, + firsttuple->mButton->getRect().mRight, + has_scroll_arrows ? mNextArrowBtn->getRect().mTop + tabcntrv_pad : mNextArrowBtn->getRect().mBottom ); + } + else + { + clip = LLRect(has_scroll_arrows ? mPrevArrowBtn->getRect().mRight : mJumpPrevArrowBtn->getRect().mLeft, + firsttuple->mButton->getRect().mTop, + has_scroll_arrows ? mNextArrowBtn->getRect().mLeft : mJumpNextArrowBtn->getRect().mRight, + firsttuple->mButton->getRect().mBottom ); + } if( clip.pointInRect( x, y ) ) {