summaryrefslogtreecommitdiff
path: root/indra/newview/lltoast.cpp
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2010-12-09 17:30:31 +0200
committerVadim ProductEngine <vsavchuk@productengine.com>2010-12-09 17:30:31 +0200
commitc78db88d060df662ee3590232ef0b9becdcf9d81 (patch)
tree626de1baa626b530f0b2c0bf9cc46f84d2700e4e /indra/newview/lltoast.cpp
parentf3d65643e533472c593ef013b4bb1dd644b85806 (diff)
STORM-774 WIP Misc renames to improve readability.
Diffstat (limited to 'indra/newview/lltoast.cpp')
-rw-r--r--indra/newview/lltoast.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 8916469e67..54ce95322c 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -113,7 +113,7 @@ LLToast::LLToast(const LLToast::Params& p)
mHideBtnPressed(false),
mIsTip(p.is_tip),
mWrapperPanel(NULL),
- mIsTransparent(false)
+ mIsFading(false)
{
mTimer.reset(new LLToastLifeTimer(this, p.lifetime_secs));
@@ -179,7 +179,7 @@ LLToast::~LLToast()
void LLToast::hide()
{
setVisible(FALSE);
- setTransparentState(false);
+ setFading(false);
mTimer->stop();
mIsHidden = true;
mOnFadeSignal(this);
@@ -244,22 +244,24 @@ void LLToast::expire()
{
if (mCanFade)
{
- if (mIsTransparent)
+ if (mIsFading)
{
+ // Fade timer expired. Time to hide.
hide();
}
else
{
- setTransparentState(true);
+ // "Life" time has ended. Time to fade.
+ setFading(true);
mTimer->restart();
}
}
}
-void LLToast::setTransparentState(bool transparent)
+void LLToast::setFading(bool transparent)
{
setBackgroundOpaque(!transparent);
- mIsTransparent = transparent;
+ mIsFading = transparent;
if (transparent)
{
@@ -275,7 +277,7 @@ F32 LLToast::getTimeLeftToLive()
{
F32 time_to_live = mTimer->getRemainingTimeF32();
- if (!mIsTransparent)
+ if (!mIsFading)
{
time_to_live += mToastFadingTime;
}
@@ -445,20 +447,20 @@ void LLToast::setBackgroundOpaque(BOOL b)
}
}
-void LLNotificationsUI::LLToast::stopFading()
+void LLNotificationsUI::LLToast::stopTimer()
{
if(mCanFade)
{
- setTransparentState(false);
+ setFading(false);
mTimer->stop();
}
}
-void LLNotificationsUI::LLToast::startFading()
+void LLNotificationsUI::LLToast::startTimer()
{
if(mCanFade)
{
- setTransparentState(false);
+ setFading(false);
mTimer->start();
}
}