diff options
| author | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2010-03-17 13:26:34 +0200 |
|---|---|---|
| committer | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2010-03-17 13:26:34 +0200 |
| commit | b2cc39d462b33f5fdfed3e6a58dcf467f1b8da46 (patch) | |
| tree | 2723d5b9fae28ff2dfece1b80aa77ea0c7ab870f /indra/newview/lltoastnotifypanel.cpp | |
| parent | a85497f598d599c6de0cc0d79170aca0728c85b1 (diff) | |
(work in progress) low task EXT-6377 - Embedded offer panels aren't reshaped by height on IM window resize
Added new Toast panel class for use in IM floater. New class handles IM floater reshape and updates Toast height.
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/lltoastnotifypanel.cpp')
| -rw-r--r-- | indra/newview/lltoastnotifypanel.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 2f77936cad..7d0fb4a46f 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -526,4 +526,28 @@ void LLToastNotifyPanel::disableRespondedOptions(LLNotificationPtr& notification } } + +////////////////////////////////////////////////////////////////////////// + +#include "llscrollcontainer.h" +LLIMToastNotifyPanel::LLIMToastNotifyPanel(LLNotificationPtr& pNotification, const LLRect& rect /* = LLRect::null */) + : LLToastNotifyPanel(pNotification, rect) +{ + mTextBox->setFollowsAll(); +} + +void LLIMToastNotifyPanel::reshape(S32 width, S32 height, BOOL called_from_parent /* = TRUE */) +{ + S32 text_height = mTextBox->getTextBoundingRect().getHeight(); + S32 widget_height = mTextBox->getRect().getHeight(); + S32 delta = text_height - widget_height; + LLRect rc = getRect(); + + rc.setLeftTopAndSize(rc.mLeft, rc.mTop, width, height + delta); + height = rc.getHeight(); + width = rc.getWidth(); + + LLToastPanel::reshape(width, height, called_from_parent); +} + // EOF |
