From a408bac29378072fbf36864164149458c978cfcc Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:44:59 -0500 Subject: Second Life viewer sources 1.17.1.0 --- linden/indra/llui/llscrollcontainer.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'linden/indra/llui/llscrollcontainer.cpp') diff --git a/linden/indra/llui/llscrollcontainer.cpp b/linden/indra/llui/llscrollcontainer.cpp index cf43ee1..be41aa8 100644 --- a/linden/indra/llui/llscrollcontainer.cpp +++ b/linden/indra/llui/llscrollcontainer.cpp @@ -292,7 +292,26 @@ BOOL LLScrollableContainerView::handleScrollWheel( S32 x, S32 y, S32 clicks ) // Opaque return TRUE; } +BOOL LLScrollableContainerView::needsToScroll(S32 x, S32 y, LLScrollableContainerView::SCROLL_ORIENTATION axis) +{ + if(mScrollbar[axis]->getVisible()) + { + LLRect inner_rect_local( 0, mInnerRect.getHeight(), mInnerRect.getWidth(), 0 ); + const S32 AUTOSCROLL_SIZE = 10; + if(mScrollbar[axis]->getVisible()) + { + inner_rect_local.mRight -= SCROLLBAR_SIZE; + inner_rect_local.mTop += AUTOSCROLL_SIZE; + inner_rect_local.mBottom = inner_rect_local.mTop - AUTOSCROLL_SIZE; + } + if( inner_rect_local.pointInRect( x, y ) && (mScrollbar[axis]->getDocPos() > 0) ) + { + return TRUE; + } + } + return FALSE; +} BOOL LLScrollableContainerView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, -- cgit v1.1