EXT-1398 Objects with long descriptions flip between showing 3 lines and 4 lines

Converted to use new clip_partial text attribute instead of custom
text clipping logic. Reviewed with Richard.
meow-7.2.2
James Cook 2009-12-10 10:45:05 -08:00
parent 722cd44d16
commit 1ad033d7fc
2 changed files with 7 additions and 17 deletions

View File

@ -416,18 +416,6 @@ void LLInspectObject::updateDescription(LLSelectNode* nodep)
LLTextBox* textbox = getChild<LLTextBox>("object_description");
textbox->setValue(desc);
// Truncate description text to fit in widget
// *HACK: OMG, use lower-left corner to truncate text
// Don't round the position, we want the left of the character
S32 corner_index = textbox->getDocIndexFromLocalCoord( 0, 0, FALSE);
LLWString desc_wide = textbox->getWText();
// index == length if position is past last character
if (corner_index < (S32)desc_wide.length())
{
desc_wide = desc_wide.substr(0, corner_index);
textbox->setWText(desc_wide);
}
}
void LLInspectObject::updateMediaCurrentURL()

View File

@ -9,7 +9,7 @@
bg_opaque_image="Inspector_Background"
can_close="false"
can_minimize="false"
height="148"
height="150"
layout="topleft"
name="inspect_object"
single_instance="true"
@ -71,13 +71,15 @@ owner secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about
width="196">
L$300,000
</text>
<text
<text
clip_partial="true"
follows="all"
font="SansSerifSmall"
height="36"
height="37"
left="8"
name="object_description"
top_pad="0"
use_ellipses="true"
width="220"
word_wrap="true">
This is a really long description for an object being as how it is at least 80 characters in length and maybe more like 120 at this point. Who knows, really?
@ -90,7 +92,7 @@ This is a really long description for an object being as how it is at least 80 c
height="13"
left_delta="0"
name="object_media_url"
top_pad="0"
top_pad="-1"
width="291"
max_length = "50"
use_ellipses="true">
@ -102,7 +104,7 @@ This is a really long description for an object being as how it is at least 80 c
label="Buy"
left="8"
name="buy_btn"
top="119"
top="121"
width="80" />
<button
follows="top|left"