summaryrefslogtreecommitdiff
path: root/indra/llui/llscrollcontainer.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-10-04 06:08:09 +0800
committerErik Kundiman <erik@megapahit.org>2023-10-04 06:08:09 +0800
commita332b8faefef8a044a2409957b415b62d6a85181 (patch)
treee76c2d8c9500c700d2d45ea1b4708747854f2f7d /indra/llui/llscrollcontainer.cpp
parentbdfd8198eb8fe7128230d562fe37eafac5c52bec (diff)
parentf352fd1090ce4d50db349cdadfa61d66783a20e8 (diff)
Merge tag '6.6.15-release'
source for viewer 6.6.15.581961
Diffstat (limited to 'indra/llui/llscrollcontainer.cpp')
-rw-r--r--indra/llui/llscrollcontainer.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp
index 3db38bbfac..ad32f7186c 100644
--- a/indra/llui/llscrollcontainer.cpp
+++ b/indra/llui/llscrollcontainer.cpp
@@ -105,8 +105,8 @@ LLScrollContainer::LLScrollContainer(const LLScrollContainer::Params& p)
mBorder = LLUICtrlFactory::create<LLViewBorder> (params);
LLView::addChild( mBorder );
- mInnerRect.set( 0, getRect().getHeight(), getRect().getWidth(), 0 );
- mInnerRect.stretch( -getBorderWidth() );
+ mInnerRect = getLocalRect();
+ mInnerRect.stretch( -getBorderWidth() );
LLRect vertical_scroll_rect = mInnerRect;
vertical_scroll_rect.mLeft = vertical_scroll_rect.mRight - scrollbar_size;
@@ -124,8 +124,9 @@ LLScrollContainer::LLScrollContainer(const LLScrollContainer::Params& p)
mScrollbar[VERTICAL] = LLUICtrlFactory::create<LLScrollbar> (sbparams);
LLView::addChild( mScrollbar[VERTICAL] );
- LLRect horizontal_scroll_rect = mInnerRect;
- horizontal_scroll_rect.mTop = horizontal_scroll_rect.mBottom + scrollbar_size;
+ LLRect horizontal_scroll_rect;
+ horizontal_scroll_rect.mTop = scrollbar_size;
+ horizontal_scroll_rect.mRight = mInnerRect.getWidth();
sbparams.name("scrollable horizontal");
sbparams.rect(horizontal_scroll_rect);
sbparams.orientation(LLScrollbar::HORIZONTAL);
@@ -134,7 +135,7 @@ LLScrollContainer::LLScrollContainer(const LLScrollContainer::Params& p)
sbparams.page_size(mInnerRect.getWidth());
sbparams.step_size(VERTICAL_MULTIPLE);
sbparams.visible(false);
- sbparams.follows.flags(FOLLOWS_LEFT | FOLLOWS_RIGHT);
+ sbparams.follows.flags(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_BOTTOM);
sbparams.change_callback(p.scroll_callback);
mScrollbar[HORIZONTAL] = LLUICtrlFactory::create<LLScrollbar> (sbparams);
LLView::addChild( mScrollbar[HORIZONTAL] );