summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llconversationview.cpp49
-rwxr-xr-xindra/newview/llconversationview.h4
-rw-r--r--indra/newview/llimconversation.cpp9
-rw-r--r--indra/newview/llimconversation.h2
-rwxr-xr-xindra/newview/llimfloatercontainer.cpp4
-rw-r--r--indra/newview/llimfloatercontainer.h2
-rw-r--r--indra/newview/skins/default/xui/en/panel_outbox_inventory.xml9
-rwxr-xr-xindra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml13
-rw-r--r--indra/newview/skins/default/xui/en/widgets/conversation_view_session.xml9
-rw-r--r--indra/newview/skins/default/xui/en/widgets/folder_view_item.xml8
-rw-r--r--indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml8
11 files changed, 86 insertions, 31 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 721abd5892..394a830e5e 100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -109,8 +109,8 @@ void LLConversationViewSession::draw()
{
LLUIImage* arrow_image = default_params.folder_arrow_image;
gl_draw_scaled_rotated_image(
- mIndentation, getRect().getHeight() - ARROW_SIZE - TEXT_PAD - TOP_PAD,
- ARROW_SIZE, ARROW_SIZE, mControlLabelRotation, arrow_image->getImage(), sFgColor);
+ mIndentation, getRect().getHeight() - mArrowSize - mTextPad - TOP_PAD,
+ mArrowSize, mArrowSize, mControlLabelRotation, arrow_image->getImage(), sFgColor);
}
@@ -227,7 +227,7 @@ void LLConversationViewSession::draw()
// virtual
S32 LLConversationViewSession::arrange(S32* width, S32* height)
{
- LLRect rect(getIndentation() + ARROW_SIZE,
+ LLRect rect(getIndentation() + mArrowSize,
getLocalRect().mTop,
getLocalRect().mRight,
getLocalRect().mTop - getItemHeight());
@@ -336,7 +336,7 @@ void LLConversationViewParticipant::initFromParams(const LLConversationViewParti
applyXUILayout(avatar_icon_params, this);
LLAvatarIconCtrl * avatarIcon = LLUICtrlFactory::create<LLAvatarIconCtrl>(avatar_icon_params);
addChild(avatarIcon);
-
+
LLButton::Params info_button_params(params.info_button());
applyXUILayout(info_button_params, this);
LLButton * button = LLUICtrlFactory::create<LLButton>(info_button_params);
@@ -366,7 +366,7 @@ BOOL LLConversationViewParticipant::postBuild()
sStaticInitialized = true;
}
- computeLabelRightPadding();
+ updateChildren();
return LLFolderViewItem::postBuild();
}
@@ -381,16 +381,11 @@ void LLConversationViewParticipant::draw()
const BOOL show_context = (getRoot() ? getRoot()->getShowSelectionContext() : FALSE);
const BOOL filled = show_context || (getRoot() ? getRoot()->getParentPanel()->hasFocus() : FALSE); // If we have keyboard focus, draw selection filled
- const LLFolderViewItem::Params& default_params = LLUICtrlFactory::getDefaultParams<LLFolderViewItem>();
- const S32 TOP_PAD = default_params.item_top_pad;
-
const LLFontGL* font = getLabelFontForStyle(mLabelStyle);
F32 right_x = 0;
- //TEXT_PAD, TOP_PAD, ICON_PAD and mIndentation are temporary values and will non-const eventually since they don't
- //apply to every single layout
- F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)TEXT_PAD - (F32)TOP_PAD;
- F32 text_left = (F32)(mAvatarIcon->getRect().mRight + ICON_PAD + mIndentation);
+ F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)mTextPad;
+ F32 text_left = (F32)getLabelXPos();
LLColor4 color = (mIsSelected && filled) ? sHighlightFgColor : sFgColor;
drawHighlight(show_context, filled, sHighlightBgColor, sFocusOutlineColor, sMouseOverColor);
@@ -437,15 +432,20 @@ void LLConversationViewParticipant::onInfoBtnClick()
void LLConversationViewParticipant::onMouseEnter(S32 x, S32 y, MASK mask)
{
mInfoBtn->setVisible(true);
- computeLabelRightPadding();
+ updateChildren();
LLFolderViewItem::onMouseEnter(x, y, mask);
}
void LLConversationViewParticipant::onMouseLeave(S32 x, S32 y, MASK mask)
{
mInfoBtn->setVisible(false);
- computeLabelRightPadding();
- LLFolderViewItem::onMouseEnter(x, y, mask);
+ updateChildren();
+ LLFolderViewItem::onMouseLeave(x, y, mask);
+}
+
+S32 LLConversationViewParticipant::getLabelXPos()
+{
+ return mAvatarIcon->getRect().mRight + mIconPad;
}
// static
@@ -463,12 +463,14 @@ void LLConversationViewParticipant::initChildrenWidths(LLConversationViewPartici
llassert(index == 0);
}
-void LLConversationViewParticipant::computeLabelRightPadding()
+void LLConversationViewParticipant::updateChildren()
{
- mLabelPaddingRight = DEFAULT_TEXT_PADDING_RIGHT;
+ mLabelPaddingRight = DEFAULT_LABEL_PADDING_RIGHT;
LLView* control;
S32 ctrl_width;
+ LLRect controlRect;
+ //Cycles through controls starting from right to left
for (S32 i = 0; i < ALIC_COUNT; ++i)
{
control = getItemChildView((EAvatarListItemChildIndex)i);
@@ -476,9 +478,22 @@ void LLConversationViewParticipant::computeLabelRightPadding()
// skip invisible views
if (!control->getVisible()) continue;
+ //Get current pos/dimensions
+ controlRect = control->getRect();
+
ctrl_width = sChildrenWidths[i]; // including space between current & left controls
// accumulate the amount of space taken by the controls
mLabelPaddingRight += ctrl_width;
+
+ //Reposition visible controls in case adjacent controls to the right are hidden.
+ controlRect.setLeftTopAndSize(
+ getLocalRect().getWidth() - mLabelPaddingRight,
+ controlRect.mTop,
+ controlRect.getWidth(),
+ controlRect.getHeight());
+
+ //Sets the new position
+ control->setShape(controlRect);
}
}
diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h
index 075ad09d5b..0b98c34c73 100755
--- a/indra/newview/llconversationview.h
+++ b/indra/newview/llconversationview.h
@@ -101,6 +101,8 @@ public:
void onMouseEnter(S32 x, S32 y, MASK mask);
void onMouseLeave(S32 x, S32 y, MASK mask);
+ /*virtual*/ S32 getLabelXPos();
+
protected:
friend class LLUICtrlFactory;
LLConversationViewParticipant( const Params& p );
@@ -125,7 +127,7 @@ private:
static bool sStaticInitialized; // this variable is introduced to improve code readability
static S32 sChildrenWidths[ALIC_COUNT];
static void initChildrenWidths(LLConversationViewParticipant* self);
- void computeLabelRightPadding();
+ void updateChildren();
LLView* getItemChildView(EAvatarListItemChildIndex child_view_index);
};
diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp
index 5425baec6d..64f171ce8f 100644
--- a/indra/newview/llimconversation.cpp
+++ b/indra/newview/llimconversation.cpp
@@ -54,6 +54,7 @@ LLIMConversation::LLIMConversation(const LLUUID& session_id)
, mInputEditor(NULL)
, mInputEditorTopPad(0)
, mRefreshTimer(new LLTimer())
+ , mHasFocus(false)
{
mSession = LLIMModel::getInstance()->findIMSession(mSessionID);
@@ -216,10 +217,10 @@ void LLIMConversation::onFocusReceived()
LLTransientDockableFloater::onFocusReceived();
- mHasFocus = mHaveFocus;
- mHaveFocus = true;
+ mHadFocus = mHasFocus;
+ mHasFocus = true;
- if (! mHasFocus)
+ if (! mHadFocus)
{
LLIMFloaterContainer* container = LLIMFloaterContainer::getInstance();
container->setConvItemSelect(mSessionID);
@@ -229,7 +230,7 @@ void LLIMConversation::onFocusReceived()
void LLIMConversation::onFocusLost()
{
setBackgroundOpaque(false);
- mHaveFocus = false;
+ mHasFocus = false;
LLTransientDockableFloater::onFocusLost();
}
diff --git a/indra/newview/llimconversation.h b/indra/newview/llimconversation.h
index e09ba79a6a..bad5eaa99f 100644
--- a/indra/newview/llimconversation.h
+++ b/indra/newview/llimconversation.h
@@ -140,8 +140,8 @@ private:
LLTimer* mRefreshTimer; ///< Defines the rate at which refresh() is called.
+ bool mHadFocus;
bool mHasFocus;
- bool mHaveFocus;
};
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index f84da25baa..3c21794d28 100755
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -700,7 +700,7 @@ void LLIMFloaterContainer::repositioningWidgets()
}
}
-void LLIMFloaterContainer::setConvItemSelect(LLUUID& session_id)
+void LLIMFloaterContainer::setConvItemSelect(const LLUUID& session_id)
{
LLFolderViewItem* widget = mConversationsWidgets[session_id];
if (widget && mSelectedSession != session_id)
@@ -778,6 +778,8 @@ void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid)
participant_view->addToFolder(widget);
current_participant_model++;
}
+
+ setConvItemSelect(uuid);
return;
}
diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h
index a7a5b8a391..4546029e93 100644
--- a/indra/newview/llimfloatercontainer.h
+++ b/indra/newview/llimfloatercontainer.h
@@ -62,7 +62,7 @@ public:
/*virtual*/ void addFloater(LLFloater* floaterp,
BOOL select_added_floater,
LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END);
- void setConvItemSelect(LLUUID& session_id);
+ void setConvItemSelect(const LLUUID& session_id);
/*virtual*/ void tabClose();
static LLFloater* getCurrentVoiceFloater();
diff --git a/indra/newview/skins/default/xui/en/panel_outbox_inventory.xml b/indra/newview/skins/default/xui/en/panel_outbox_inventory.xml
index 203febbf18..c80e5b168a 100644
--- a/indra/newview/skins/default/xui/en/panel_outbox_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_outbox_inventory.xml
@@ -20,6 +20,13 @@
folder_indentation="8"
item_height="20"
item_top_pad="4"
- selection_image="Rounded_Square"/>
+ selection_image="Rounded_Square"
+ left_pad="5"
+ icon_pad="2"
+ icon_width="16"
+ text_pad="1"
+ text_pad_right="4"
+ arrow_size="12"
+ max_folder_item_overlap="2"/>
<item allow_open="false"/>
</inventory_panel>
diff --git a/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml b/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml
index 7ddcfe3b03..0024decd4c 100755
--- a/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml
+++ b/indra/newview/skins/default/xui/en/widgets/conversation_view_participant.xml
@@ -1,18 +1,27 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<conversation_view_participant
- folder_arrow_image="ForSale_Badge"
+ folder_arrow_image="Folder_Arrow"
folder_indentation="0"
item_height="24"
- item_top_pad="4"
+ item_top_pad="0"
selection_image="Rounded_Square"
mouse_opaque="true"
follows="left|top|right"
+ left_pad="0"
+ icon_pad="10"
+ icon_width="20"
+ text_pad="7"
+ text_pad_right="4"
+ arrow_size="12"
+ max_folder_item_overlap="2"
>
<avatar_icon
follows="left"
height="20"
default_icon_name="Generic_Person"
+ layout="topleft"
left="50"
+ top="2"
width="20" />
<info_button
follows="right"
diff --git a/indra/newview/skins/default/xui/en/widgets/conversation_view_session.xml b/indra/newview/skins/default/xui/en/widgets/conversation_view_session.xml
index f44731ea3d..b8c39eec1d 100644
--- a/indra/newview/skins/default/xui/en/widgets/conversation_view_session.xml
+++ b/indra/newview/skins/default/xui/en/widgets/conversation_view_session.xml
@@ -6,4 +6,11 @@
item_top_pad="4"
selection_image="Rounded_Square"
mouse_opaque="true"
- follows="left|top|right"/>
+ follows="left|top|right"
+ left_pad="5"
+ icon_pad="2"
+ icon_width="16"
+ text_pad="1"
+ text_pad_right="4"
+ arrow_size="12"
+ max_folder_item_overlap="2"/>
diff --git a/indra/newview/skins/default/xui/en/widgets/folder_view_item.xml b/indra/newview/skins/default/xui/en/widgets/folder_view_item.xml
index 6fa74f403d..bbd53ccb12 100644
--- a/indra/newview/skins/default/xui/en/widgets/folder_view_item.xml
+++ b/indra/newview/skins/default/xui/en/widgets/folder_view_item.xml
@@ -7,4 +7,10 @@
selection_image="Rounded_Square"
mouse_opaque="true"
follows="left|top|right"
- />
+ left_pad="5"
+ icon_pad="2"
+ icon_width="16"
+ text_pad="1"
+ text_pad_right="4"
+ arrow_size="12"
+ max_folder_item_overlap="2"/>
diff --git a/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml b/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml
index 77d8024cb2..590a4730a9 100644
--- a/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml
+++ b/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_folder.xml
@@ -5,7 +5,13 @@
item_height="20"
item_top_pad="4"
selection_image="Rounded_Square"
- >
+ left_pad="5"
+ icon_pad="2"
+ icon_width="16"
+ text_pad="1"
+ text_pad_right="4"
+ arrow_size="12"
+ max_folder_item_overlap="2">
<new_badge
label="New"
label_offset_horiz="-1"