diff options
author | Jon Wolk <jwolk@lindenlab.com> | 2007-12-19 00:56:59 +0000 |
---|---|---|
committer | Jon Wolk <jwolk@lindenlab.com> | 2007-12-19 00:56:59 +0000 |
commit | 7dd08303a3ebf9718c2c60a4d94b81d5d7845f8c (patch) | |
tree | 6195a8585cc7998647afcaec2167e728e4abd3c1 /indra/llui/llscrollbar.cpp | |
parent | 4d87303e78c1accde85b217b325e0c08930b0c4c (diff) |
svn merge -r 75354:76103 svn+ssh://svn.lindenlab.com/svn/linden/branches/voice-group-moderation-3 -> release. Finished product of QAR-134
Diffstat (limited to 'indra/llui/llscrollbar.cpp')
-rw-r--r-- | indra/llui/llscrollbar.cpp | 44 |
1 files changed, 32 insertions, 12 deletions
diff --git a/indra/llui/llscrollbar.cpp b/indra/llui/llscrollbar.cpp index 99908a6bc0..b106bb570d 100644 --- a/indra/llui/llscrollbar.cpp +++ b/indra/llui/llscrollbar.cpp @@ -159,30 +159,50 @@ void LLScrollbar::setDocParams( S32 size, S32 pos ) void LLScrollbar::setDocPos(S32 pos) { - mDocPos = llclamp( pos, 0, getDocPosMax() ); - mDocChanged = TRUE; + if (pos != mDocPos) + { + mDocPos = llclamp( pos, 0, getDocPosMax() ); + mDocChanged = TRUE; - updateThumbRect(); + updateThumbRect(); + } } void LLScrollbar::setDocSize(S32 size) { - mDocSize = size; - mDocPos = llclamp( mDocPos, 0, getDocPosMax() ); - mDocChanged = TRUE; + if (size != mDocSize) + { + mDocSize = size; + mDocPos = llclamp( mDocPos, 0, getDocPosMax() ); + mDocChanged = TRUE; - updateThumbRect(); + updateThumbRect(); + } } void LLScrollbar::setPageSize( S32 page_size ) { - mPageSize = page_size; - mDocPos = llclamp( mDocPos, 0, getDocPosMax() ); - mDocChanged = TRUE; + if (page_size != mPageSize) + { + mPageSize = page_size; + mDocPos = llclamp( mDocPos, 0, getDocPosMax() ); + mDocChanged = TRUE; - updateThumbRect(); + updateThumbRect(); + } +} + +BOOL LLScrollbar::isAtBeginning() +{ + return mDocPos == 0; +} + +BOOL LLScrollbar::isAtEnd() +{ + return mDocPos == getDocPosMax(); } + void LLScrollbar::updateThumbRect() { // llassert( 0 <= mDocSize ); @@ -479,7 +499,7 @@ void LLScrollbar::draw() // Draw background and thumb. LLUUID rounded_rect_image_id; rounded_rect_image_id.set(LLUI::sAssetsGroup->getString("rounded_square.tga")); - LLImageGL* rounded_rect_imagep = LLUI::sImageProvider->getUIImageByID(rounded_rect_image_id); + LLImageGL* rounded_rect_imagep = LLUI::sImageProvider->getImageByID(rounded_rect_image_id); if (!rounded_rect_imagep) { |