summaryrefslogtreecommitdiff
path: root/indra/newview/llchathistory.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-18 18:12:58 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-18 18:12:58 +0000
commit1c67e8f386d69e06c1ff820eb551b3c69592ff89 (patch)
tree6e3d565e5f5c1bbe4d974f0c9a4dc5e1af607692 /indra/newview/llchathistory.cpp
parent675b15948c5169ce07dec83a0f730e6a5b9d57d8 (diff)
parent7f432e085809a354ce0599c53c8f1f1eec52e18e (diff)
viewer2 merge.
Diffstat (limited to 'indra/newview/llchathistory.cpp')
-rw-r--r--indra/newview/llchathistory.cpp34
1 files changed, 19 insertions, 15 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index cf5ac6b2e6..8fb9decf7b 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -721,22 +721,26 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
notify_box->setFollowsRight();
notify_box->setFollowsTop();
- LLButton* accept_button = notify_box->getChild<LLButton> ("Accept",
- TRUE);
- if (accept_button != NULL)
+ ctrl_list_t ctrls = notify_box->getControlPanel()->getCtrlList();
+ S32 offset = 0;
+ for (ctrl_list_t::iterator it = ctrls.begin(); it != ctrls.end(); it++)
{
- 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);
+ LLButton * button = dynamic_cast<LLButton*> (*it);
+ if (button != NULL)
+ {
+ button->setOrigin( offset,
+ button->getRect().mBottom);
+ button->setLeftHPad(2 * HPAD);
+ button->setRightHPad(2 * HPAD);
+ // set zero width before perform autoResize()
+ button->setRect(LLRect(button->getRect().mLeft,
+ button->getRect().mTop, button->getRect().mLeft,
+ button->getRect().mBottom));
+ button->setAutoResize(true);
+ button->autoResize();
+ offset += 2 * HPAD + button->getRect().getWidth();
+ button->setFollowsNone();
+ }
}
LLTextEditor* text_editor = notify_box->getChild<LLTextEditor>("text_editor_box", TRUE);