summaryrefslogtreecommitdiff
path: root/indra/newview/llconversationview.cpp
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2012-11-28 11:35:59 -0800
committerGilbert Gonzales <gilbert@lindenlab.com>2012-11-28 11:35:59 -0800
commit80f8a465eb2885246b0a1daca66077ecd1dcc61d (patch)
tree21b0b83e93d2130e401316f22e8f019bc6dd9b98 /indra/newview/llconversationview.cpp
parenta77a49af4537ca7419947e083ae6950c1aba8330 (diff)
CHUI-548: Now a p2p conversation is aligned with the nearby chat arrow. Just had to check for a p2p conversation type and then adjust then decrease the indentation. Also made LLFolderViewItem::drawOpenFolderArrow() a non-virtual function and adjusted code accordingly.
Diffstat (limited to 'indra/newview/llconversationview.cpp')
-rwxr-xr-xindra/newview/llconversationview.cpp27
1 files changed, 12 insertions, 15 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index e40d57c318..3aadc2986f 100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -80,7 +80,8 @@ LLConversationViewSession::LLConversationViewSession(const LLConversationViewSes
mSessionTitle(NULL),
mSpeakingIndicator(NULL),
mVoiceClientObserver(NULL),
- mMinimizedMode(false)
+ mMinimizedMode(false),
+ mHasArrow(true)
{
mFlashTimer = new LLFlashTimer();
}
@@ -135,6 +136,7 @@ BOOL LLConversationViewSession::postBuild()
icon->setVisible(true);
icon->setValue(session->mOtherParticipantID);
mSpeakingIndicator->setSpeakerId(gAgentID, session->mSessionID, true);
+ mHasArrow = false;
}
break;
}
@@ -183,11 +185,10 @@ void LLConversationViewSession::draw()
const BOOL show_context = (getRoot() ? getRoot()->getShowSelectionContext() : FALSE);
// we don't draw the open folder arrow in minimized mode
- if (!mMinimizedMode)
+ if (mHasArrow && !mMinimizedMode)
{
// update the rotation angle of open folder arrow
updateLabelRotation();
-
drawOpenFolderArrow(default_params, sFgColor);
}
@@ -227,14 +228,18 @@ BOOL LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask )
// virtual
S32 LLConversationViewSession::arrange(S32* width, S32* height)
{
- S32 h_pad = getIndentation() + mArrowSize;
+ //LLFolderViewFolder::arrange computes value for getIndentation() function below
+ S32 arranged = LLFolderViewFolder::arrange(width, height);
+
+ S32 h_pad = mHasArrow ? getIndentation() + mArrowSize : getIndentation();
+
LLRect rect(mMinimizedMode ? getLocalRect().mLeft : h_pad,
getLocalRect().mTop,
getLocalRect().mRight,
getLocalRect().mTop - getItemHeight());
mItemPanel->setShape(rect);
- return LLFolderViewFolder::arrange(width, height);
+ return arranged;
}
// virtual
@@ -262,7 +267,8 @@ void LLConversationViewSession::toggleMinimizedMode(bool is_minimized)
// except for the icon which we display in minimized mode
getChild<LLView>("conversation_item_stack")->setVisible(!mMinimizedMode);
- S32 h_pad = getIndentation() + mArrowSize;
+ S32 h_pad = mHasArrow ? getIndentation() + mArrowSize : getIndentation();
+
mItemPanel->translate(mMinimizedMode ? -h_pad : h_pad, 0);
}
@@ -340,15 +346,6 @@ void LLConversationViewSession::onCurrentVoiceSessionChanged(const LLUUID& sessi
}
}
-void LLConversationViewSession::drawOpenFolderArrow(const LLFolderViewItem::Params& default_params, const LLUIColor& fg_color)
-{
- LLConversationItem * itemp = dynamic_cast<LLConversationItem*>(getViewModelItem());
- if (itemp && itemp->getType() != LLConversationItem::CONV_SESSION_1_ON_1)
- {
- LLFolderViewFolder::drawOpenFolderArrow(default_params, fg_color);
- }
-}
-
//
// Implementation of conversations list participant (avatar) widgets
//