Backed out changeset: d3a0a3d9e08f

Vertical tabs dont scroll and this otherwise breaks scrolling of horizontal tabs in the first place
Liny 2013-03-15 11:41:50 -07:00
parent a31f88158e
commit 58b9d27043
1 changed files with 16 additions and 8 deletions

View File

@ -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<S32> 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 ) )
{