From 0336752a5eb0b4847812ca372f788d4ba7751a52 Mon Sep 17 00:00:00 2001 From: Eugene Kondrashev Date: Tue, 17 Nov 2009 16:07:01 +0200 Subject: Implemented normal task EXT-1551-[BSI] Add scrollbar to group notice notification --HG-- branch : product-engine --- indra/newview/lltoastgroupnotifypanel.cpp | 38 +++++++-------- .../skins/default/xui/en/panel_group_notify.xml | 57 +++++++++------------- 2 files changed, 40 insertions(+), 55 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp index f82573f46c..d1bdcb1354 100644 --- a/indra/newview/lltoastgroupnotifypanel.cpp +++ b/indra/newview/lltoastgroupnotifypanel.cpp @@ -40,7 +40,7 @@ #include "lliconctrl.h" #include "llinventoryfunctions.h" #include "llnotify.h" -#include "lltextbox.h" +#include "llviewertexteditor.h" #include "lluiconstants.h" #include "llui.h" @@ -54,7 +54,7 @@ #include "llfloaterinventory.h" #include "llinventorytype.h" -const S32 LLToastGroupNotifyPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT = 4; +const S32 LLToastGroupNotifyPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT = 7; LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(LLNotificationPtr& notification) : LLToastPanel(notification), @@ -84,11 +84,6 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(LLNotificationPtr& notification //message body const std::string& message = payload["message"].asString(); - - LLTextBox* pSubjectText = getChild("subject"); - pSubjectText->setValue(subject); - - LLTextBox* pDateTimeText = getChild("datetime"); std::string timeStr = "["+LLTrans::getString("UTCTimeWeek")+"],[" +LLTrans::getString("UTCTimeDay")+"] [" +LLTrans::getString("UTCTimeMth")+"] [" @@ -102,20 +97,23 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(LLNotificationPtr& notification LLSD substitution; substitution["datetime"] = (S32) notice_date.secondsSinceEpoch(); LLStringUtil::format(timeStr, substitution); - pDateTimeText->setValue(timeStr); - LLTextBox* pMessageText = getChild("message"); - - //If message is empty let it be invisible and not take place at the panel - if(message.size() != 0) - { - pMessageText->setVisible(TRUE); - pMessageText->setValue(message); - } - else - { - pMessageText->setVisible(FALSE); - } + LLViewerTextEditor* pMessageText = getChild("message"); + pMessageText->clear(); + + LLStyle::Params style; + LLFontGL* subject_font = LLFontGL::getFontByName(getString("subject_font")); + if (subject_font) + style.font = subject_font; + pMessageText->appendText(subject, FALSE, style); + + LLFontGL* date_font = LLFontGL::getFontByName(getString("date_font")); + if (date_font) + style.font = date_font; + pMessageText->appendText(timeStr + "\n", TRUE, style); + + style.font = pMessageText->getDefaultFont(); + pMessageText->appendText(message, TRUE, style); //attachment BOOL hasInventory = payload["inventory_offer"].isDefined(); diff --git a/indra/newview/skins/default/xui/en/panel_group_notify.xml b/indra/newview/skins/default/xui/en/panel_group_notify.xml index e699a77581..d22d58329c 100644 --- a/indra/newview/skins/default/xui/en/panel_group_notify.xml +++ b/indra/newview/skins/default/xui/en/panel_group_notify.xml @@ -3,7 +3,7 @@ background_visible="true" bevel_style="in" bg_alpha_color="0 0 0 0" - height="135" + height="90" label="instant_message" layout="topleft" left="0" @@ -12,7 +12,13 @@ width="305"> + value="7" /> + + - - - + width="270" + word_wrap="true" > +