From 5e0e86869dcb0c365c486776f8dacba14a029d1e Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 4 Oct 2010 18:38:38 -0700 Subject: EXP-138 WIP Chat and IM notices not aligned with Bottom bar in Skylight Viewer --- indra/newview/llnearbychathandler.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview/llnearbychathandler.cpp') diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 47d32e57fb..f06f4eab28 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -336,7 +336,12 @@ void LLNearbyChatScreenChannel::showToastsBottom() return; LLRect toast_rect; - S32 bottom = getRect().mBottom; + S32 channel_bottom = gViewerWindow->getWorldViewRectScaled().mBottom + gSavedSettings.getS32("ChannelBottomPanelMargin"); + LLRect cur_rect = getRect(); + cur_rect.translate(0, channel_bottom - cur_rect.mBottom); + setRect(cur_rect); + + S32 bottom = channel_bottom; S32 margin = gSavedSettings.getS32("ToastGap"); //sort active toasts -- cgit v1.2.3 From 3081f89744ab527af4c843bdf898654d4ba87b57 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 4 Oct 2010 19:07:28 -0700 Subject: EXP-138 FIXED Chat and IM notices not aligned with Bottom bar in Skylight Viewer --- indra/newview/llnearbychathandler.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/newview/llnearbychathandler.cpp') diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index f06f4eab28..adb79fd4fd 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -336,10 +336,8 @@ void LLNearbyChatScreenChannel::showToastsBottom() return; LLRect toast_rect; - S32 channel_bottom = gViewerWindow->getWorldViewRectScaled().mBottom + gSavedSettings.getS32("ChannelBottomPanelMargin"); - LLRect cur_rect = getRect(); - cur_rect.translate(0, channel_bottom - cur_rect.mBottom); - setRect(cur_rect); + updateBottom(); + S32 channel_bottom = getRect().mBottom; S32 bottom = channel_bottom; S32 margin = gSavedSettings.getS32("ToastGap"); -- cgit v1.2.3 From 01b28ddf5ddc7118bc8b2047d899aee0293a8721 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Wed, 6 Oct 2010 20:10:36 -0700 Subject: EXP-156 WIP Implement custom Skylight hints --- indra/newview/llnearbychathandler.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'indra/newview/llnearbychathandler.cpp') diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index adb79fd4fd..7ee9aac0de 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -471,6 +471,14 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) } nearby_chat->addMessage(chat_msg, true, args); + + if(chat_msg.mSourceType == CHAT_SOURCE_AGENT + && chat_msg.mFromID.notNull() + && chat_msg.mFromID != gAgentID) + { + LLFirstUse::otherAvatarChatFirst(); + } + if( nearby_chat->getVisible() || ( chat_msg.mSourceType == CHAT_SOURCE_AGENT && gSavedSettings.getBOOL("UseChatBubbles") ) ) @@ -530,13 +538,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) notification["font_size"] = (S32)LLViewerChat::getChatFontSize() ; channel->addNotification(notification); } - - if(chat_msg.mSourceType == CHAT_SOURCE_AGENT - && chat_msg.mFromID.notNull() - && chat_msg.mFromID != gAgentID) - { - LLFirstUse::otherAvatarChatFirst(); - } + } void LLNearbyChatHandler::onDeleteToast(LLToast* toast) -- cgit v1.2.3 From f3d65643e533472c593ef013b4bb1dd644b85806 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Thu, 9 Dec 2010 17:30:18 +0200 Subject: STORM-774 WIP Partially reverted transparency fix for nearby chat toasts (STORM-717) to develop a more generic one (applicable to all notification toasts). --- indra/newview/llnearbychathandler.cpp | 39 ----------------------------------- 1 file changed, 39 deletions(-) (limited to 'indra/newview/llnearbychathandler.cpp') diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index dfbbaa0941..d2ad78f140 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -165,20 +165,11 @@ 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; }; @@ -606,34 +597,4 @@ 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 -- cgit v1.2.3 From c78db88d060df662ee3590232ef0b9becdcf9d81 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Thu, 9 Dec 2010 17:30:31 +0200 Subject: STORM-774 WIP Misc renames to improve readability. --- indra/newview/llnearbychathandler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llnearbychathandler.cpp') diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index d2ad78f140..6f92dd6445 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -121,7 +121,7 @@ protected: if (!toast) return; LL_DEBUGS("NearbyChat") << "Pooling toast" << llendl; toast->setVisible(FALSE); - toast->stopFading(); + toast->stopTimer(); toast->setIsHidden(true); // Nearby chat toasts that are hidden, not destroyed. They are collected to the toast pool, so that @@ -296,7 +296,7 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification) { panel->addMessage(notification); toast->reshapeToPanel(); - toast->startFading(); + toast->startTimer(); arrangeToasts(); return; @@ -341,7 +341,7 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification) panel->init(notification); toast->reshapeToPanel(); - toast->startFading(); + toast->startTimer(); m_active_toasts.push_back(toast->getHandle()); -- cgit v1.2.3