diff options
author | Dessie Linden <dessie@lindenlab.com> | 2010-12-07 12:51:09 -0800 |
---|---|---|
committer | Dessie Linden <dessie@lindenlab.com> | 2010-12-07 12:51:09 -0800 |
commit | 39e4303653a2eb4e6582fdea9646db8b29f96805 (patch) | |
tree | f753cac9570470aa03596459450ca5160740656d /indra/newview/llnearbychathandler.cpp | |
parent | d607b9c01ac158000de14cb6f0624b8f29673662 (diff) | |
parent | f59033bfd8f78d51b10bb1d424994f786276ff95 (diff) |
Merged latest fixes
Diffstat (limited to 'indra/newview/llnearbychathandler.cpp')
-rw-r--r-- | indra/newview/llnearbychathandler.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index d2ad78f140..dfbbaa0941 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -165,11 +165,20 @@ public: : LLToast(p), mNearbyChatScreenChannelp(nc_channelp) { + updateTransparency(); + setMouseEnterCallback(boost::bind(&LLNearbyChatToast::updateTransparency, this)); + setMouseLeaveCallback(boost::bind(&LLNearbyChatToast::updateTransparency, this)); } /*virtual*/ void onClose(bool app_quitting); + /*virtual*/ void setBackgroundOpaque(BOOL b); + +protected: + /*virtual*/ void setTransparentState(bool transparent); private: + void updateTransparency(); + LLNearbyChatScreenChannel* mNearbyChatScreenChannelp; }; @@ -597,4 +606,34 @@ void LLNearbyChatToast::onClose(bool app_quitting) mNearbyChatScreenChannelp->onToastDestroyed(this, app_quitting); } +// virtual +void LLNearbyChatToast::setBackgroundOpaque(BOOL b) +{ + // We don't want background changes: transparency is handled differently. + LLToast::setBackgroundOpaque(TRUE); +} + +// virtual +void LLNearbyChatToast::setTransparentState(bool transparent) +{ + LLToast::setTransparentState(transparent); + updateTransparency(); +} + +void LLNearbyChatToast::updateTransparency() +{ + ETypeTransparency transparency_type; + + if (isHovered()) + { + transparency_type = TT_ACTIVE; + } + else + { + transparency_type = getTransparentState() ? TT_FADING : TT_INACTIVE; + } + + LLFloater::updateTransparency(transparency_type); +} + // EOF |