fixed normal bug (EXT-1971) Add fade time period for nearby chat bubbles
--HG-- branch : product-enginemeow-7.2.2
parent
07dabef250
commit
f4424f8867
|
|
@ -4886,7 +4886,7 @@
|
|||
<key>Value</key>
|
||||
<integer>10</integer>
|
||||
</map>
|
||||
<key>ToastOpaqueTime</key>
|
||||
<key>ToastFadingTime</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Number of seconds while a toast is fading </string>
|
||||
|
|
@ -4898,6 +4898,29 @@
|
|||
<integer>1</integer>
|
||||
</map>
|
||||
<key>StartUpToastLifeTime</key>
|
||||
<key>NearbyToastFadingTime</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Number of seconds while a nearby chat toast is fading </string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>3</integer>
|
||||
</map>
|
||||
<key>NearbyToastLifeTime</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Number of seconds while a nearby chat toast exists</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>23</integer>
|
||||
</map>
|
||||
<key>StartUpToastLifeTime</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Number of seconds while a StartUp toast exist</string>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ public:
|
|||
Optional<LLUUID> notif_id, //notification ID
|
||||
session_id; //im session ID
|
||||
Optional<LLNotificationPtr> notification;
|
||||
Optional<F32> lifetime_secs;
|
||||
Optional<F32> lifetime_secs,
|
||||
fading_time_secs; // Number of seconds while a toast is fading
|
||||
Optional<toast_callback_t> on_delete_toast,
|
||||
on_mouse_enter;
|
||||
Optional<bool> 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;
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
<panel width="250" height="30" background_visible="true" background_opaque="false" bg_alpha_color="0.0 0.0 0.0 1.0" name="msg_caption">
|
||||
<avatar_icon
|
||||
top="25" left="10" width="20" height="20" follows="left|top"
|
||||
|
|
|
|||
Loading…
Reference in New Issue