summaryrefslogtreecommitdiff
path: root/indra/newview/llscriptfloater.cpp
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2010-03-16 12:33:25 -0700
committerRoxie Linden <roxie@lindenlab.com>2010-03-16 12:33:25 -0700
commit60c4621500e478d66a8bdc3a1c80573be2860fee (patch)
treefa10b52caf3a54e03502058cd52d77952370cb34 /indra/newview/llscriptfloater.cpp
parent2e525711cd08d5f1dce991d1b6595a8dd41c9e3b (diff)
parentba414d500ca8cb88da530c89ba373c95195ce633 (diff)
Automated merge from viewer/viewer-2-0
Diffstat (limited to 'indra/newview/llscriptfloater.cpp')
-rw-r--r--indra/newview/llscriptfloater.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp
index eb71cc52c8..f35cb3516a 100644
--- a/indra/newview/llscriptfloater.cpp
+++ b/indra/newview/llscriptfloater.cpp
@@ -154,14 +154,17 @@ void LLScriptFloater::createForm(const LLUUID& notification_id)
}
// create new form
- mScriptForm = new LLToastNotifyPanel(notification);
+ LLRect toast_rect = getRect();
+ // LLToastNotifyPanel will fit own content in vertical direction,
+ // but it needs an initial rect to properly calculate its width
+ // Use an initial rect of the script floater to make the floater window more configurable.
+ mScriptForm = new LLToastNotifyPanel(notification, toast_rect);
addChild(mScriptForm);
// position form on floater
mScriptForm->setOrigin(0, 0);
// make floater size fit form size
- LLRect toast_rect = getRect();
LLRect panel_rect = mScriptForm->getRect();
toast_rect.setLeftTopAndSize(toast_rect.mLeft, toast_rect.mTop, panel_rect.getWidth(), panel_rect.getHeight() + getHeaderHeight());
setShape(toast_rect);