diff options
Diffstat (limited to 'indra/newview/lltoast.cpp')
-rw-r--r-- | indra/newview/lltoast.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 22b12ee132..9abfab300c 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -67,6 +67,7 @@ LLToast::Params::Params() LLToast::LLToast(const LLToast::Params& p) : LLModalDialog(LLSD(), p.is_modal), mPanel(p.panel), + mToastLifetime(p.lifetime_secs), mToastFadingTime(p.fading_time_secs), mNotificationID(p.notif_id), mSessionID(p.session_id), @@ -241,6 +242,13 @@ void LLToast::draw() drawChild(mHideBtn); } } + + // if timer started and remaining time <= fading time + if (mTimer->getStarted() && (mToastLifetime + - mTimer->getEventTimer().getElapsedTimeF32()) <= mToastFadingTime) + { + setBackgroundOpaque(FALSE); + } } //-------------------------------------------------------------------------- @@ -263,7 +271,10 @@ void LLToast::setVisible(BOOL show) { mTimer->start(); } - LLModalDialog::setFrontmost(FALSE); + if (!getVisible()) + { + LLModalDialog::setFrontmost(FALSE); + } } else { |