summaryrefslogtreecommitdiff
path: root/indra/llui/llscrollcontainer.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2012-03-09 12:58:50 -0500
committerOz Linden <oz@lindenlab.com>2012-03-09 12:58:50 -0500
commit633bd44b4a9dbf7f4f262929b28848e04b446b26 (patch)
treedc3261611d5b07282c9a4210d49893be779c7d2a /indra/llui/llscrollcontainer.cpp
parent35dd27d5e57b2957aaa904cce841fccd4cfff850 (diff)
parent1b624f5ea686292652978c72d39e5546efe23d0f (diff)
merge changes for vmrg-225
Diffstat (limited to 'indra/llui/llscrollcontainer.cpp')
-rw-r--r--indra/llui/llscrollcontainer.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp
index ad4cc20d9a..20bed050ad 100644
--- a/indra/llui/llscrollcontainer.cpp
+++ b/indra/llui/llscrollcontainer.cpp
@@ -378,23 +378,21 @@ 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;
-
- // Must retest now that visible_height has changed
- if( !*show_v_scrollbar && (*visible_height < doc_height) )
- {
- *show_v_scrollbar = TRUE;
- *visible_width -= scrollbar_size;
- }
+ // Note: Do *not* recompute *show_v_scrollbar here because with
+ // the (- scrollbar_size) we just did we will always add a vertical scrollbar
+ // even if the height of the items is actually less than the visible size.
+ // Fear not though: there's enough calcVisibleSize() calls to add a vertical slider later.
}
}
}