summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRichard Nelson <richard@lindenlab.com>2009-10-14 20:16:18 +0000
committerRichard Nelson <richard@lindenlab.com>2009-10-14 20:16:18 +0000
commitfd312d1929de708e5765cf1b3815cb61752fc355 (patch)
treecc4dbf334b89970f1499acfaee3571b7cd529374 /indra/newview
parent7197e1aa962be6174a219027ced4dec72b5553a2 (diff)
improved metrics for llfontgl::getWidth (use greater of character width/xadvance)
llfontgl::Addchar now called consistently when requesting font metrics no longer possible to have font glyph info without rendered font EXT-1294 - LLExpandableTextBox: wrong ellipses reviewed by James and Mani
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llexpandabletextbox.cpp15
-rw-r--r--indra/newview/skins/default/xui/en/widgets/expandable_text.xml1
2 files changed, 15 insertions, 1 deletions
diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp
index 2467356018..e2d6bcee8f 100644
--- a/indra/newview/llexpandabletextbox.cpp
+++ b/indra/newview/llexpandabletextbox.cpp
@@ -57,7 +57,20 @@ public:
{
return start_offset;
}
- /*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const { return getEnd() - getStart(); }
+ /*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const
+ {
+ // require full line to ourselves
+ if (line_offset == 0)
+ {
+ // print all our text
+ return getEnd() - getStart();
+ }
+ else
+ {
+ // wait for next line
+ return 0;
+ }
+ }
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect)
{
F32 right_x;
diff --git a/indra/newview/skins/default/xui/en/widgets/expandable_text.xml b/indra/newview/skins/default/xui/en/widgets/expandable_text.xml
index 120deaaef5..319beac291 100644
--- a/indra/newview/skins/default/xui/en/widgets/expandable_text.xml
+++ b/indra/newview/skins/default/xui/en/widgets/expandable_text.xml
@@ -5,6 +5,7 @@
more_label="More"
follows="left|top"
name="text"
+ allow_scroll="true"
use_ellipses="true"
word_wrap="true"
tab_stop="true"