Skip to content
Snippets Groups Projects
Commit 40df6a5c authored by Alexei Arabadji's avatar Alexei Arabadji
Browse files

fixed EXT-6805 No fading on toast's disappearing

Reverted toast fading logic.

reviewed by Mike Antipov https://codereview.productengine.com/secondlife/r/292/

--HG--
branch : product-engine
parent e096bdc7
No related branches found
No related tags found
No related merge requests found
...@@ -67,6 +67,7 @@ LLToast::Params::Params() ...@@ -67,6 +67,7 @@ LLToast::Params::Params()
LLToast::LLToast(const LLToast::Params& p) LLToast::LLToast(const LLToast::Params& p)
: LLModalDialog(LLSD(), p.is_modal), : LLModalDialog(LLSD(), p.is_modal),
mPanel(p.panel), mPanel(p.panel),
mToastLifetime(p.lifetime_secs),
mToastFadingTime(p.fading_time_secs), mToastFadingTime(p.fading_time_secs),
mNotificationID(p.notif_id), mNotificationID(p.notif_id),
mSessionID(p.session_id), mSessionID(p.session_id),
...@@ -241,6 +242,13 @@ void LLToast::draw() ...@@ -241,6 +242,13 @@ void LLToast::draw()
drawChild(mHideBtn); drawChild(mHideBtn);
} }
} }
// if timer started and remaining time <= fading time
if (mTimer->getStarted() && (mToastLifetime
- mTimer->getEventTimer().getElapsedTimeF32()) <= mToastFadingTime)
{
setBackgroundOpaque(FALSE);
}
} }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
......
...@@ -209,6 +209,7 @@ class LLToast : public LLModalDialog ...@@ -209,6 +209,7 @@ class LLToast : public LLModalDialog
// timer counts a lifetime of a toast // timer counts a lifetime of a toast
std::auto_ptr<LLToastLifeTimer> mTimer; std::auto_ptr<LLToastLifeTimer> mTimer;
F32 mToastLifetime; // in seconds
F32 mToastFadingTime; // in seconds F32 mToastFadingTime; // in seconds
LLPanel* mPanel; LLPanel* mPanel;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment