summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2010-06-10 15:11:41 +0300
committerMike Antipov <mantipov@productengine.com>2010-06-10 15:11:41 +0300
commit0a6e0deb3245775a284fad78aa4007be8d09074b (patch)
treecd84b51fb7570cc82d2966930bf77fc98178c81b /indra
parente22f4bb4e793457cf8f18db530c306fa22e8c35b (diff)
EXT-7564 FIXED Added "wrap" attribute for status message in an inventory folder view.
EXT-7047 PARTIAL FIXED truncation of status message is fixed. Updated arranging in folder view to take into account required height for status message. --HG-- branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfolderview.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index a87f7288fa..676c50014f 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -246,6 +246,7 @@ LLFolderView::LLFolderView(const Params& p)
text_p.font(font);
text_p.visible(false);
text_p.allow_html(true);
+ text_p.wrap(true); // allow multiline text. See EXT-7564, EXT-7047
mStatusTextBox = LLUICtrlFactory::create<LLTextBox> (text_p);
mStatusTextBox->setFollowsLeft();
mStatusTextBox->setFollowsTop();
@@ -953,6 +954,23 @@ void LLFolderView::draw()
}
mStatusTextBox->setValue(mStatusText);
mStatusTextBox->setVisible( TRUE );
+
+ // firstly reshape message textbox with current size. This is necessary to
+ // LLTextBox::getTextPixelHeight works properly
+ const LLRect local_rect = getLocalRect();
+ mStatusTextBox->setShape(local_rect);
+
+ // get preferable text height...
+ S32 pixel_height = mStatusTextBox->getTextPixelHeight();
+ bool height_changed = local_rect.getHeight() != pixel_height;
+ if (height_changed)
+ {
+ // ... if it does not match current height, lets rearrange current view.
+ // This will indirectly call ::arrange and reshape of the status textbox.
+ // We should call this method to also notify parent about required rect.
+ // See EXT-7564, EXT-7047.
+ arrangeFromRoot();
+ }
}