summaryrefslogtreecommitdiff
path: root/indra/llui/llscrollcontainer.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2012-04-20 06:56:33 -0700
committerOz Linden <oz@lindenlab.com>2012-04-20 06:56:33 -0700
commitd3ec35fc6c2b8b47336650fe0570995201854a78 (patch)
treef2113a1fa374fab76509f4462b2253b315584f65 /indra/llui/llscrollcontainer.cpp
parent4c3377a45abe3c8b2a0e376c62045a8f1260da08 (diff)
parent19e0cc93a8af661dbac47552474a704ade600c74 (diff)
merge changes for latest viewer-development
Diffstat (limited to 'indra/llui/llscrollcontainer.cpp')
-rw-r--r--indra/llui/llscrollcontainer.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp
index ad4cc20d9a..9b7e30bb04 100644
--- a/indra/llui/llscrollcontainer.cpp
+++ b/indra/llui/llscrollcontainer.cpp
@@ -378,19 +378,24 @@ void LLScrollContainer::calcVisibleSize( S32 *visible_width, S32 *visible_height
if (!mHideScrollbar)
{
- if( *visible_height < doc_height )
+ // Note: 1 pixel change can happen on final animation and should not trigger
+ // the display of sliders.
+ if ((doc_height - *visible_height) > 1)
{
*show_v_scrollbar = TRUE;
*visible_width -= scrollbar_size;
}
-
- if( *visible_width < doc_width )
+ if ((doc_width - *visible_width) > 1)
{
*show_h_scrollbar = TRUE;
*visible_height -= scrollbar_size;
+ // The view inside the scroll container should not be extended
+ // to container's full height to ensure the correct computation
+ // of *show_v_scrollbar after subtracting horizontal scrollbar_size.
+
// Must retest now that visible_height has changed
- if( !*show_v_scrollbar && (*visible_height < doc_height) )
+ if( !*show_v_scrollbar && ((doc_height - *visible_height) > 1) )
{
*show_v_scrollbar = TRUE;
*visible_width -= scrollbar_size;