summaryrefslogtreecommitdiff
path: root/indra
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
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')
-rwxr-xr-xindra/llui/llfolderviewitem.h2
-rwxr-xr-xindra/newview/llconversationview.cpp27
-rwxr-xr-xindra/newview/llconversationview.h3
-rw-r--r--indra/newview/llfloaterimcontainer.cpp6
4 files changed, 20 insertions, 18 deletions
diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h
index c5d6d26e84..2e633a39e5 100755
--- a/indra/llui/llfolderviewitem.h
+++ b/indra/llui/llfolderviewitem.h
@@ -264,7 +264,7 @@ public:
// virtual void handleDropped();
virtual void draw();
- virtual void drawOpenFolderArrow(const Params& default_params, const LLUIColor& fg_color);
+ void drawOpenFolderArrow(const Params& default_params, const LLUIColor& fg_color);
void drawHighlight(const BOOL showContent, const BOOL hasKeyboardFocus, const LLUIColor &bgColor, const LLUIColor &outlineColor, const LLUIColor &mouseOverColor);
void drawLabel(const LLFontGL * font, const F32 x, const F32 y, const LLColor4& color, F32 &right_x);
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
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
//
diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h
index acd7128b7d..c6cb502355 100755
--- a/indra/newview/llconversationview.h
+++ b/indra/newview/llconversationview.h
@@ -74,8 +74,6 @@ public:
/*virtual*/ bool isMinimized() { return mMinimizedMode; }
- /*virtual*/ void drawOpenFolderArrow(const LLFolderViewItem::Params& default_params, const LLUIColor& fg_color);
-
void toggleMinimizedMode(bool is_minimized);
void setVisibleIfDetached(BOOL visible);
@@ -98,6 +96,7 @@ private:
LLFlashTimer* mFlashTimer;
bool mMinimizedMode;
+ bool mHasArrow;
LLVoiceClientStatusObserver* mVoiceClientObserver;
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 016a7723b6..5fbbfd1283 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1383,6 +1383,12 @@ LLConversationViewSession* LLFloaterIMContainer::createConversationItemWidget(LL
params.tool_tip = params.name;
params.container = this;
+ //Indentation for aligning the p2p converstation image with the nearby chat arrow
+ if(item->getType() == LLConversationItem::CONV_SESSION_1_ON_1)
+ {
+ params.folder_indentation = 3;
+ }
+
return LLUICtrlFactory::create<LLConversationViewSession>(params);
}