From 73d07c93255a24f0ea23453f8ed180ce1d63a78a Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Mon, 12 Apr 2010 17:09:50 +0300 Subject: fixed major EXT-6593 "New notifications arrived while you were away" is bold and doesn't fit on toast * Unbolded startup toast message text; * Avoided increasing complexity of LLToastNotifyPanel class that in future should be decoupled on separate independent toast panel implementations and added LLPanelGenericTip class to represent generic notifytip panels. reviewed by Vadim Savchuk and Mike Antipov at https://codereview.productengine.com/secondlife/r/214/ --HG-- branch : product-engine --- indra/newview/lltoastpanel.cpp | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'indra/newview/lltoastpanel.cpp') diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp index 755e647777..d142a0665b 100644 --- a/indra/newview/lltoastpanel.cpp +++ b/indra/newview/lltoastpanel.cpp @@ -32,14 +32,14 @@ #include "llviewerprecompiledheaders.h" -#include "lltoastpanel.h" - +#include "llpanelgenerictip.h" #include "llnotifications.h" +#include "lltoastpanel.h" //static const S32 LLToastPanel::MIN_PANEL_HEIGHT = 40; // VPAD(4)*2 + ICON_HEIGHT(32) -LLToastPanel::LLToastPanel(LLNotificationPtr& notification) +LLToastPanel::LLToastPanel(const LLNotificationPtr& notification) { mNotification = notification; } @@ -91,3 +91,20 @@ void LLToastPanel::snapToMessageHeight(LLTextBase* message, S32 maxLineCount) } } +// static +LLToastPanel* LLToastPanel::buidPanelFromNotification( + const LLNotificationPtr& notification) +{ + LLToastPanel* res = NULL; + + if (notification->getName() == "SystemMessageTip") + { + res = new LLPanelGenericTip(notification); + } + /* + else if(...) + create all other specific non-public toast panel + */ + + return res; +} -- cgit v1.2.3