From f4424f8867eec64f770715d1d44ea4276c8129af Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Fri, 30 Oct 2009 13:24:49 +0200 Subject: fixed normal bug (EXT-1971) Add fade time period for nearby chat bubbles --HG-- branch : product-engine --- indra/newview/app_settings/settings.xml | 25 +++++++++++++++++++++- indra/newview/llnearbychathandler.cpp | 2 ++ indra/newview/lltoast.cpp | 6 ++++-- indra/newview/lltoast.h | 4 +++- .../skins/default/xui/en/panel_chat_item.xml | 6 +++--- 5 files changed, 36 insertions(+), 7 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 5fc0cb6ff8..af702db5f0 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4886,7 +4886,7 @@ Value 10 - ToastOpaqueTime + ToastFadingTime Comment Number of seconds while a toast is fading @@ -4898,6 +4898,29 @@ 1 StartUpToastLifeTime + NearbyToastFadingTime + + Comment + Number of seconds while a nearby chat toast is fading + Persist + 1 + Type + S32 + Value + 3 + + NearbyToastLifeTime + + Comment + Number of seconds while a nearby chat toast exists + Persist + 1 + Type + S32 + Value + 23 + + StartUpToastLifeTime Comment Number of seconds while a StartUp toast exist diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 6b0d6d61e0..aef0886be4 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -162,6 +162,8 @@ bool LLNearbyChatScreenChannel::createPoolToast() LLToast::Params p; p.panel = panel; + p.lifetime_secs = gSavedSettings.getS32("NearbyToastLifeTime"); + p.fading_time_secs = gSavedSettings.getS32("NearbyToastFadingTime"); LLToast* toast = new LLToast(p); diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 24824a095c..903df21e78 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -49,13 +49,15 @@ LLToast::Params::Params() enable_hide_btn("enable_hide_btn", true), force_show("force_show", false), force_store("force_store", false), + fading_time_secs("fading_time_secs", gSavedSettings.getS32("ToastFadingTime")), lifetime_secs("lifetime_secs", gSavedSettings.getS32("NotificationToastLifeTime")) {}; LLToast::LLToast(const LLToast::Params& p) : LLModalDialog(LLSD(), p.is_modal), mPanel(p.panel), - mToastLifetime(p.lifetime_secs), + mToastLifetime(p.lifetime_secs), + mToastFadingTime(p.fading_time_secs), mNotificationID(p.notif_id), mSessionID(p.session_id), mCanFade(p.can_fade), @@ -127,7 +129,7 @@ bool LLToast::lifetimeHasExpired() if (mTimer.getStarted()) { F32 elapsed_time = mTimer.getElapsedTimeF32(); - if ((mToastLifetime - elapsed_time) <= gSavedSettings.getS32("ToastOpaqueTime")) + if ((mToastLifetime - elapsed_time) <= mToastFadingTime) { setBackgroundOpaque(FALSE); } diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index 0698c94880..b670f47045 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -63,7 +63,8 @@ public: Optional notif_id, //notification ID session_id; //im session ID Optional notification; - Optional lifetime_secs; + Optional lifetime_secs, + fading_time_secs; // Number of seconds while a toast is fading Optional on_delete_toast, on_mouse_enter; Optional can_fade, @@ -157,6 +158,7 @@ private: // timer counts a lifetime of a toast LLTimer mTimer; F32 mToastLifetime; // in seconds + F32 mToastFadingTime; // in seconds LLPanel* mPanel; LLButton* mHideBtn; diff --git a/indra/newview/skins/default/xui/en/panel_chat_item.xml b/indra/newview/skins/default/xui/en/panel_chat_item.xml index 78f53562cd..05b04bbf8e 100644 --- a/indra/newview/skins/default/xui/en/panel_chat_item.xml +++ b/indra/newview/skins/default/xui/en/panel_chat_item.xml @@ -5,10 +5,10 @@ name="instant_message" width="300" height="180" - background_opaque="false" - background_visible="true" + background_opaque="true" + background_visible="false" follows="left|top|right|bottom" - bg_alpha_color="0.3 0.3 0.3 1.0"> + bg_alpha_color="0.3 0.3 0.3 0">