summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llchathistory.cpp29
-rw-r--r--indra/newview/llchathistory.h21
-rw-r--r--indra/newview/skins/default/xui/en/panel_chat_header.xml85
-rw-r--r--indra/newview/skins/default/xui/en/panel_chat_separator.xml16
-rw-r--r--indra/newview/skins/default/xui/en/widgets/chat_history.xml4
5 files changed, 86 insertions, 69 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index e561507e69..2ccd6b7d35 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -132,8 +132,7 @@ public:
menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_object_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
mPopupMenuHandleObject = menu->getHandle();
- LLPanel* visible_panel = getChild<LLPanel>("im_header");
- visible_panel->setMouseDownCallback(boost::bind(&LLChatHistoryHeader::onHeaderPanelClick, this, _2, _3, _4));
+ setMouseDownCallback(boost::bind(&LLChatHistoryHeader::onHeaderPanelClick, this, _2, _3, _4));
return LLPanel::postBuild();
}
@@ -290,7 +289,11 @@ mMessageSeparatorFilename(p.message_separator),
mLeftTextPad(p.left_text_pad),
mRightTextPad(p.right_text_pad),
mLeftWidgetPad(p.left_widget_pad),
-mRightWidgetPad(p.right_widget_pad)
+mRightWidgetPad(p.right_widget_pad),
+mTopSeparatorPad(p.top_separator_pad),
+mBottomSeparatorPad(p.bottom_separator_pad),
+mTopHeaderPad(p.top_header_pad),
+mBottomHeaderPad(p.bottom_header_pad)
{
}
@@ -332,16 +335,30 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat, LLStyle::Params& sty
LLView* view = NULL;
std::string view_text;
+ LLInlineViewSegment::Params p;
+ p.force_newline = true;
+ p.left_pad = mLeftWidgetPad;
+ p.right_pad = mRightWidgetPad;
+
if (mLastFromName == chat.mFromName)
{
view = getSeparator();
view_text = "\n";
+ p.top_pad = mTopSeparatorPad;
+ p.bottom_pad = mBottomSeparatorPad;
}
else
{
view = getHeader(chat);
view_text = chat.mFromName + MESSAGE_USERNAME_DATE_SEPARATOR + formatCurrentTime() + '\n';
+ if (getText().size() == 0)
+ p.top_pad = 0;
+ else
+ p.top_pad = mTopHeaderPad;
+ p.bottom_pad = mBottomHeaderPad;
}
+ p.view = view;
+
//Prepare the rect for the view
LLRect target_rect = getDocumentView()->getRect();
// squeeze down the widget by subtracting padding off left and right
@@ -350,12 +367,6 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat, LLStyle::Params& sty
view->reshape(target_rect.getWidth(), view->getRect().getHeight());
view->setOrigin(target_rect.mLeft, view->getRect().mBottom);
- LLInlineViewSegment::Params p;
- p.view = view;
- p.force_newline = true;
- p.left_pad = mLeftWidgetPad;
- p.right_pad = mRightWidgetPad;
-
appendWidget(p, view_text, false);
//Append the text message
diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h
index 92dcfdd958..3789ebff4e 100644
--- a/indra/newview/llchathistory.h
+++ b/indra/newview/llchathistory.h
@@ -54,6 +54,14 @@ class LLChatHistory : public LLTextEditor
Optional<S32> left_widget_pad;
//Widget right padding from the scroll rect
Optional<S32> right_widget_pad;
+ //Separator top padding
+ Optional<S32> top_separator_pad;
+ //Separator bottom padding
+ Optional<S32> bottom_separator_pad;
+ //Header top padding
+ Optional<S32> top_header_pad;
+ //Header bottom padding
+ Optional<S32> bottom_header_pad;
Params()
: message_header("message_header"),
@@ -61,7 +69,11 @@ class LLChatHistory : public LLTextEditor
left_text_pad("left_text_pad"),
right_text_pad("right_text_pad"),
left_widget_pad("left_widget_pad"),
- right_widget_pad("right_widget_pad")
+ right_widget_pad("right_widget_pad"),
+ top_separator_pad("top_separator_pad"),
+ bottom_separator_pad("bottom_separator_pad"),
+ top_header_pad("top_header_pad"),
+ bottom_header_pad("bottom_header_pad")
{
}
@@ -105,9 +117,16 @@ class LLChatHistory : public LLTextEditor
std::string mLastFromName;
std::string mMessageHeaderFilename;
std::string mMessageSeparatorFilename;
+
S32 mLeftTextPad;
S32 mRightTextPad;
+
S32 mLeftWidgetPad;
S32 mRightWidgetPad;
+
+ S32 mTopSeparatorPad;
+ S32 mBottomSeparatorPad;
+ S32 mTopHeaderPad;
+ S32 mBottomHeaderPad;
};
#endif /* LLCHATHISTORY_H_ */
diff --git a/indra/newview/skins/default/xui/en/panel_chat_header.xml b/indra/newview/skins/default/xui/en/panel_chat_header.xml
index a9f622e018..64519b2571 100644
--- a/indra/newview/skins/default/xui/en/panel_chat_header.xml
+++ b/indra/newview/skins/default/xui/en/panel_chat_header.xml
@@ -1,53 +1,44 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
+ background_visible="true"
+ bevel_style="in"
+ bg_alpha_color="black"
follows="left|top|right"
- height="57"
- label="im_header_container"
+ height="20"
+ label="im_header"
layout="topleft"
- left="8"
- name="im_header_container">
- <panel
- background_visible="true"
- bevel_style="in"
- bg_alpha_color="black"
- follows="left|top|right"
- height="30"
- label="im_header"
+ name="im_header" >
+ <avatar_icon
+ follows="left"
+ height="16"
+ image_name="icon_avatar_online.tga"
layout="topleft"
- name="im_header"
- top_pad="17">
- <avatar_icon
- follows="left"
- height="20"
- image_name="icon_avatar_online.tga"
- layout="topleft"
- left="5"
- mouse_opaque="true"
- name="avatar_icon"
- top="5"
- width="20" />
- <text
- follows="left|right"
- font="SansSerifBigBold"
- height="20"
- layout="topleft"
- left_pad="10"
- right="-50"
- name="user_name"
- text_color="white"
- top="5"
- value="Darth Vader"
- use_ellipses="true" />
- <text
- follows="right"
- font="SansSerifBig"
- height="20"
- layout="topleft"
- name="time_box"
- right="0"
- text_color="white"
- top="5"
- value="23:30"
- width="50" />
- </panel>
+ left="2"
+ mouse_opaque="true"
+ name="avatar_icon"
+ top="2"
+ width="16" />
+ <text
+ follows="left|right"
+ font="SansSerifBigBold"
+ height="20"
+ layout="topleft"
+ left_pad="6"
+ right="-50"
+ name="user_name"
+ text_color="white"
+ top="3"
+ value="Darth Vader"
+ use_ellipses="true" />
+ <text
+ follows="right"
+ font="SansSerifBig"
+ height="20"
+ layout="topleft"
+ name="time_box"
+ right="0"
+ text_color="white"
+ top="3"
+ value="23:30"
+ width="50" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_chat_separator.xml b/indra/newview/skins/default/xui/en/panel_chat_separator.xml
index bacc750e86..d0a2ddb289 100644
--- a/indra/newview/skins/default/xui/en/panel_chat_separator.xml
+++ b/indra/newview/skins/default/xui/en/panel_chat_separator.xml
@@ -1,16 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
+ background_visible="true"
+ bg_alpha_color="black"
follows="left|right|top"
- height="9"
+ height="1"
layout="topleft"
- left="8"
- name="chat_separator_container">
- <panel
- background_visible="true"
- bg_alpha_color="black"
- follows="left|right|top"
- height="1"
- layout="topleft"
- name="chat_separator_panel"
- top_pad="3" />
-</panel>
+ name="chat_separator_panel" />
diff --git a/indra/newview/skins/default/xui/en/widgets/chat_history.xml b/indra/newview/skins/default/xui/en/widgets/chat_history.xml
index ea6997ebd5..32916c0816 100644
--- a/indra/newview/skins/default/xui/en/widgets/chat_history.xml
+++ b/indra/newview/skins/default/xui/en/widgets/chat_history.xml
@@ -6,6 +6,10 @@
right_text_pad="15"
left_widget_pad="0"
right_widget_pad="10"
+ top_separator_pad="5"
+ bottom_separator_pad="5"
+ top_header_pad="17"
+ bottom_header_pad="10"
max_length="2147483647"
enabled="false"
track_bottom="true"