diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-09-07 22:55:07 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-09-07 22:55:07 +0000 |
commit | 79653dfed48105019b8ecca9cf4bfaa2a390e100 (patch) | |
tree | 455943795bf3371bbff0689604cf5eedd903fae4 /indra/newview/lltoastimpanel.cpp | |
parent | a9b2296b2b5664cfc8d86c7f99c00c10268e250a (diff) |
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1566 https://svn.aws.productengine.com/secondlife/pe/stable-2@1580 -> viewer-2.0.0-3
* Bugs: EXT-807 EXT-810 EXT-811 EXT-784 EXT-820 EXT-393 EXT-826 EXT-811 EXT-801 EXT-808 EXT-393 EXT-743 EXT-699 EXT-397 EXT-812 EXT-736 EXT-744 EXT-809 EXT-306 EXT-854 EXT-857 EXT-790
* New Dev: EXT-694 EXT-393 EXT-367 EXT-819 EXT-795 EXT-827 EXT-788
* EXT-272 - Draggable Landmarks
* EXT-715 - Block List Panel
* EXT-782 - Implement advanced place information accordions
Diffstat (limited to 'indra/newview/lltoastimpanel.cpp')
-rw-r--r-- | indra/newview/lltoastimpanel.cpp | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index e41181c9e1..913e46e05e 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -34,9 +34,7 @@ #include "lltoastimpanel.h" #include "llimpanel.h" -const S32 LLToastIMPanel::MAX_MESSAGE_HEIGHT = 50; -const S32 LLToastIMPanel::CAPTION_HEIGHT = 30; -const S32 LLToastIMPanel::TOP_PAD = 5; +const S32 LLToastIMPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT = 6; //-------------------------------------------------------------------------- LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notification), @@ -60,7 +58,13 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif mReplyBtn->setClickedCallback(boost::bind(&LLToastIMPanel::onClickReplyBtn, this)); - snapToMessageHeight(); + S32 maxLinesCount; + std::istringstream ss( getString("message_max_lines_count") ); + if (!(ss >> maxLinesCount)) + { + maxLinesCount = DEFAULT_MESSAGE_MAX_LINE_COUNT; + } + snapToMessageHeight(mMessage, maxLinesCount); } //-------------------------------------------------------------------------- @@ -69,22 +73,6 @@ LLToastIMPanel::~LLToastIMPanel() } //-------------------------------------------------------------------------- -void LLToastIMPanel::snapToMessageHeight() -{ - S32 required_text_height = mMessage->getTextPixelHeight(); - S32 text_height = llmin(required_text_height, MAX_MESSAGE_HEIGHT); - LLRect text_rect = mMessage->getRect(); - LLRect btn_rect = mReplyBtn->getRect(); - - - mMessage->reshape( text_rect.getWidth(), text_height, TRUE); - mMessage->setValue(mMessage->getText()); - - S32 panel_height = CAPTION_HEIGHT + text_height + btn_rect.getHeight() + TOP_PAD*5; - reshape( getRect().getWidth(), panel_height, TRUE); -} - -//-------------------------------------------------------------------------- void LLToastIMPanel::onClickReplyBtn() { LLIMFloater::toggle(mSessionID); |