summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAlexei Arabadji <aarabadji@productengine.com>2010-02-03 11:38:03 +0200
committerAlexei Arabadji <aarabadji@productengine.com>2010-02-03 11:38:03 +0200
commit5e63efe1da6b72fc0ce9771b9ef1e5c9d9bcb537 (patch)
tree0bb995e398324e5f83fbd04fab92ca5a9beee6db /indra
parent0c7e18cbc67367e7bcc1fe2cfe59e7068209e814 (diff)
fixed EXT-4805 “Friend offer is corrupted in resized IM window”,
reverted IM floater default width; made offer buttons have absolute positions; avoided text message scrolling with default IM floater width; --HG-- branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llchathistory.cpp38
-rw-r--r--indra/newview/skins/default/xui/en/floater_im_session.xml10
2 files changed, 43 insertions, 5 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 581c210bd5..64226ac52b 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -55,6 +55,7 @@
#include "lltoastnotifypanel.h"
#include "llviewerregion.h"
#include "llworld.h"
+#include "lluiconstants.h"
#include "llsidetray.h"//for blocked objects panel
@@ -664,8 +665,36 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
{
LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(
notification);
+ //we can't set follows in xml since it broke toasts behavior
notify_box->setFollowsLeft();
notify_box->setFollowsRight();
+ notify_box->setFollowsTop();
+
+ LLButton* accept_button = notify_box->getChild<LLButton> ("Accept",
+ TRUE);
+ if (accept_button != NULL)
+ {
+ accept_button->setFollowsNone();
+ accept_button->setOrigin(2*HPAD, accept_button->getRect().mBottom);
+ }
+
+ LLButton* decline_button = notify_box->getChild<LLButton> (
+ "Decline", TRUE);
+ if (accept_button != NULL && decline_button != NULL)
+ {
+ decline_button->setFollowsNone();
+ decline_button->setOrigin(4*HPAD
+ + accept_button->getRect().getWidth(),
+ decline_button->getRect().mBottom);
+ }
+
+ LLTextEditor* text_editor = notify_box->getChild<LLTextEditor>("text_editor_box", TRUE);
+ S32 text_heigth = 0;
+ if(text_editor != NULL)
+ {
+ text_heigth = text_editor->getTextBoundingRect().getHeight();
+ }
+
//Prepare the rect for the view
LLRect target_rect = mEditor->getDocumentView()->getRect();
// squeeze down the widget by subtracting padding off left and right
@@ -675,6 +704,15 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
notify_box->getRect().getHeight());
notify_box->setOrigin(target_rect.mLeft, notify_box->getRect().mBottom);
+ if (text_editor != NULL)
+ {
+ S32 text_heigth_delta =
+ text_editor->getTextBoundingRect().getHeight()
+ - text_heigth;
+ notify_box->reshape(target_rect.getWidth(),
+ notify_box->getRect().getHeight() + text_heigth_delta);
+ }
+
LLInlineViewSegment::Params params;
params.view = notify_box;
params.left_pad = mLeftWidgetPad;
diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index 9aaa660574..d2e5473157 100644
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -12,7 +12,7 @@
can_minimize="true"
can_close="true"
visible="false"
- width="440"
+ width="360"
can_resize="true"
min_width="250"
min_height="190">
@@ -20,7 +20,7 @@
animate="false"
follows="all"
height="320"
- width="440"
+ width="360"
layout="topleft"
orientation="horizontal"
name="im_panels"
@@ -38,7 +38,7 @@
left="0"
top="0"
height="200"
- width="325"
+ width="245"
user_resize="true">
<button
height="20"
@@ -65,7 +65,7 @@
parse_highlights="true"
allow_html="true"
left="1"
- width="320">
+ width="240">
</chat_history>
<line_editor
bottom="0"
@@ -75,7 +75,7 @@
label="To"
layout="bottomleft"
name="chat_editor"
- width="320">
+ width="240">
</line_editor>
</layout_panel>
</layout_stack>