Don't bother updating scroll list scrollbar rect when invisible

This commit is contained in:
Liru Færs
2019-08-17 23:54:30 -04:00
parent 1ffa9f7c0c
commit 878b200217

View File

@@ -465,10 +465,10 @@ void LLScrollListCtrl::updateLayout()
{
// provide space on the right for scrollbar
mItemListRect.mRight = getRect().getWidth() - mBorderThickness - SCROLLBAR_SIZE;
mScrollbar->setOrigin(mItemListRect.mRight, mItemListRect.mBottom);
mScrollbar->reshape(SCROLLBAR_SIZE, mItemListRect.getHeight() + (mDisplayColumnHeaders ? mHeadingHeight : 0));
}
mScrollbar->setOrigin(getRect().getWidth() - mBorderThickness - SCROLLBAR_SIZE, mItemListRect.mBottom);
mScrollbar->reshape(SCROLLBAR_SIZE, mItemListRect.getHeight() + (mDisplayColumnHeaders ? mHeadingHeight : 0));
mScrollbar->setPageSize(page_lines);
mScrollbar->setDocSize( getItemCount() );
mScrollbar->setVisible(scrollbar_visible);