From 8cf95e16830521d5aa9467b1f4d84e4d1343bd31 Mon Sep 17 00:00:00 2001
From: Eugene Mutavchi <emutavchi@productengine.com>
Date: Fri, 22 Jan 2010 20:27:58 +0200
Subject: Fixed normal bug EXT-4486(nearby voice list not aligned correctly):
 Corrected indent of my_panel content. Changed the order of buttons of avatar
 list item, notice that it affects all avatar lists(on people panel, group
 chat participants, etc).

--HG--
branch : product-engine
---
 indra/newview/llavatarlistitem.cpp                 | 12 +++++-----
 indra/newview/llavatarlistitem.h                   |  2 +-
 .../default/xui/en/floater_voice_controls.xml      |  3 ++-
 .../default/xui/en/panel_avatar_list_item.xml      | 28 ++++++++++++----------
 4 files changed, 24 insertions(+), 21 deletions(-)

diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp
index 66ab32f3e8..2bcd097717 100644
--- a/indra/newview/llavatarlistitem.cpp
+++ b/indra/newview/llavatarlistitem.cpp
@@ -440,17 +440,17 @@ LLAvatarListItem::icon_color_map_t& LLAvatarListItem::getItemIconColorMap()
 // static
 void LLAvatarListItem::initChildrenWidths(LLAvatarListItem* avatar_item)
 {
+	//speaking indicator width + padding
+	S32 speaking_indicator_width = avatar_item->getRect().getWidth() - avatar_item->mSpeakingIndicator->getRect().mLeft;
+
 	//profile btn width + padding
-	S32 profile_btn_width = avatar_item->getRect().getWidth() - avatar_item->mProfileBtn->getRect().mLeft;
+	S32 profile_btn_width = avatar_item->mSpeakingIndicator->getRect().mLeft - avatar_item->mProfileBtn->getRect().mLeft;
 
 	//info btn width + padding
 	S32 info_btn_width = avatar_item->mProfileBtn->getRect().mLeft - avatar_item->mInfoBtn->getRect().mLeft;
 
-	//speaking indicator width + padding
-	S32 speaking_indicator_width = avatar_item->mInfoBtn->getRect().mLeft - avatar_item->mSpeakingIndicator->getRect().mLeft;
-
 	// last interaction time textbox width + padding
-	S32 last_interaction_time_width = avatar_item->mSpeakingIndicator->getRect().mLeft - avatar_item->mLastInteractionTime->getRect().mLeft;
+	S32 last_interaction_time_width = avatar_item->mInfoBtn->getRect().mLeft - avatar_item->mLastInteractionTime->getRect().mLeft;
 
 	// icon width + padding
 	S32 icon_width = avatar_item->mAvatarName->getRect().mLeft - avatar_item->mAvatarIcon->getRect().mLeft;
@@ -462,9 +462,9 @@ void LLAvatarListItem::initChildrenWidths(LLAvatarListItem* avatar_item)
 	sChildrenWidths[--index] = icon_width;
 	sChildrenWidths[--index] = 0; // for avatar name we don't need its width, it will be calculated as "left available space"
 	sChildrenWidths[--index] = last_interaction_time_width;
-	sChildrenWidths[--index] = speaking_indicator_width;
 	sChildrenWidths[--index] = info_btn_width;
 	sChildrenWidths[--index] = profile_btn_width;
+	sChildrenWidths[--index] = speaking_indicator_width;
 }
 
 void LLAvatarListItem::updateChildren()
diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h
index 479a4833cb..61c0a8660e 100644
--- a/indra/newview/llavatarlistitem.h
+++ b/indra/newview/llavatarlistitem.h
@@ -129,9 +129,9 @@ private:
 	 * @see updateChildren()
 	 */
 	typedef enum e_avatar_item_child {
+		ALIC_SPEAKER_INDICATOR,
 		ALIC_PROFILE_BUTTON,
 		ALIC_INFO_BUTTON,
-		ALIC_SPEAKER_INDICATOR,
 		ALIC_INTERACTION_TIME,
 		ALIC_NAME,
 		ALIC_ICON,
diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml
index f473a51ff6..c4411db8c5 100644
--- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml
+++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml
@@ -56,7 +56,7 @@
              height="18"
              default_icon_name="Generic_Person"
              layout="topleft"
-             left="0"
+             left="5"
              name="user_icon"
              top="0"
              width="18" />
@@ -78,6 +78,7 @@
              follows="top|right"
              height="16"
              layout="topleft"
+             right="-3"
              name="speaking_indicator"
              left_pad="5"
              visible="true"
diff --git a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml
index 615ade99a2..c605975c8e 100644
--- a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml
@@ -65,28 +65,18 @@
      height="15"
      layout="topleft"
      left_pad="5"
+     right="-72"
      name="last_interaction"
      text_color="LtGray_50"
      value="0s"
      width="24" />
-    <output_monitor
-     auto_update="true"
-     follows="right"
-     draw_border="false"
-     height="16"
-     layout="topleft"
-     left_pad="5"
-     mouse_opaque="true"
-     name="speaking_indicator"
-     visible="true"
-     width="20" />
     <button
      follows="right"
      height="16"
      image_pressed="Info_Press"
      image_unselected="Info_Over"
      left_pad="3"
-     right="-31"
+     right="-53"
      name="info_btn"
      top_delta="-2"
      width="16" />
@@ -96,9 +86,21 @@
      image_overlay="ForwardArrow_Off"
      layout="topleft"
      left_pad="5"
-     right="-3"
+     right="-28"
      name="profile_btn"
      tool_tip="View profile"
      top_delta="-2"
      width="20" />
+    <output_monitor
+     auto_update="true"
+     follows="right"
+     draw_border="false"
+     height="16"
+     layout="topleft"
+     left_pad="5"
+     right="-3"
+     mouse_opaque="true"
+     name="speaking_indicator"
+     visible="true"
+     width="20" />
 </panel>
-- 
cgit v1.2.3