summaryrefslogtreecommitdiff
path: root/indra/newview/llfolderview.cpp
diff options
context:
space:
mode:
authorSeth ProductEngine <slitovchuk@productengine.com>2012-03-16 01:08:20 +0200
committerSeth ProductEngine <slitovchuk@productengine.com>2012-03-16 01:08:20 +0200
commit34c599858bd64b7fbda767ff9c9f7d8bcd2c2c25 (patch)
tree98d656e37d7f31d822c168d505d2464615e950e5 /indra/newview/llfolderview.cpp
parentb9521a38f11dd9f44f216adb7d02263d25272572 (diff)
CHUI-53 FIXED vertical scroll bar in inventory floater to appear when horizontal scroll bar hides last item in folder view.
Added a scroll container which provides the information about the height of currently displayed folder view contents. It is used for updating vertical scroll bar visibility in inventory panel.
Diffstat (limited to 'indra/newview/llfolderview.cpp')
-rw-r--r--indra/newview/llfolderview.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 4a42bb2c24..6c4b781122 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -165,6 +165,33 @@ void LLCloseAllFoldersFunctor::doItem(LLFolderViewItem* item)
{ }
///----------------------------------------------------------------------------
+/// Class LLFolderViewScrollContainer
+///----------------------------------------------------------------------------
+
+// virtual
+const LLRect LLFolderViewScrollContainer::getScrolledViewRect() const
+{
+ LLRect rect = LLRect::null;
+ if (mScrolledView)
+ {
+ LLFolderView* folder_view = dynamic_cast<LLFolderView*>(mScrolledView);
+ if (folder_view)
+ {
+ S32 height = folder_view->mRunningHeight;
+
+ rect = mScrolledView->getRect();
+ rect.setLeftTopAndSize(rect.mLeft, rect.mTop, rect.getWidth(), height);
+ }
+ }
+
+ return rect;
+}
+
+LLFolderViewScrollContainer::LLFolderViewScrollContainer(const LLScrollContainer::Params& p)
+: LLScrollContainer(p)
+{}
+
+///----------------------------------------------------------------------------
/// Class LLFolderView
///----------------------------------------------------------------------------
LLFolderView::Params::Params()
@@ -535,6 +562,7 @@ void LLFolderView::reshape(S32 width, S32 height, BOOL called_from_parent)
{
width = scroll_rect.getWidth();
}
+
LLView::reshape(width, height, called_from_parent);
mReshapeSignal(mSelectedItems, FALSE);
}