summaryrefslogtreecommitdiff
path: root/indra/newview/llexpandabletextbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llexpandabletextbox.cpp')
-rw-r--r--indra/newview/llexpandabletextbox.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp
index 48b5fc11b7..7bc48185e6 100644
--- a/indra/newview/llexpandabletextbox.cpp
+++ b/indra/newview/llexpandabletextbox.cpp
@@ -51,7 +51,7 @@ public:
/*virtual*/ void getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const
{
// more label always spans width of text box
- width = mEditor.getTextRect().getWidth();
+ width = mEditor.getTextRect().getWidth() - mEditor.getHPad();
height = llceil(mStyle->getFont()->getLineHeight());
}
/*virtual*/ S32 getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const
@@ -153,6 +153,11 @@ void LLExpandableTextBox::LLTextBoxEx::showExpandText()
{
if (!mExpanderVisible)
{
+ // make sure we're scrolled to top when collapsing
+ if (mScroller)
+ {
+ mScroller->goToTop();
+ }
// get fully visible lines
std::pair<S32, S32> visible_lines = getVisibleLines(true);
S32 last_line = visible_lines.second - 1;