summaryrefslogtreecommitdiff
path: root/indra/newview/llscriptfloater.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-03-11 09:19:20 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-03-11 09:19:20 +0000
commit1b1dd127a4329cc7fed9d36608f4fc04ff056843 (patch)
tree7c998ab7f4037aee8446817293bedafffd7958c2 /indra/newview/llscriptfloater.cpp
parent6d738f25d9be0f4b576c8a55e9091ced589daf71 (diff)
parenta618a3913af506878adf59a2c5b5fb12e665e35b (diff)
merge.
Diffstat (limited to 'indra/newview/llscriptfloater.cpp')
-rw-r--r--indra/newview/llscriptfloater.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp
index 32fd42aded..f35cb3516a 100644
--- a/indra/newview/llscriptfloater.cpp
+++ b/indra/newview/llscriptfloater.cpp
@@ -135,7 +135,7 @@ void LLScriptFloater::setNotificationId(const LLUUID& id)
void LLScriptFloater::getAllowedRect(LLRect& rect)
{
- rect = gViewerWindow->getWorldViewRectRaw();
+ rect = gViewerWindow->getWorldViewRectScaled();
}
void LLScriptFloater::createForm(const LLUUID& notification_id)
@@ -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);