summaryrefslogtreecommitdiff
path: root/indra/llui/llscrollcontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llscrollcontainer.cpp')
-rw-r--r--indra/llui/llscrollcontainer.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp
index e5e31e45a9..0e3c73f633 100644
--- a/indra/llui/llscrollcontainer.cpp
+++ b/indra/llui/llscrollcontainer.cpp
@@ -272,7 +272,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,