From 6ec3da44cff2b40914b7cc823b95e8b2f43f0f12 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 3 May 2022 05:29:35 -0400
Subject: [PATCH] Add complexity and outfit count to appearance floater - from
 FS

---
 indra/newview/lloutfitslist.cpp               | 20 +++++++++
 indra/newview/lloutfitslist.h                 |  4 ++
 indra/newview/llpaneloutfitedit.cpp           | 17 ++++++-
 indra/newview/llpaneloutfitedit.h             |  4 ++
 indra/newview/llpaneloutfitsinventory.cpp     |  7 +++
 indra/newview/llpaneloutfitsinventory.h       |  2 +
 indra/newview/llpanelwearing.cpp              | 28 +++++++++++-
 indra/newview/llpanelwearing.h                |  6 +++
 indra/newview/llsidepanelappearance.cpp       | 15 ++++++-
 indra/newview/llsidepanelappearance.h         |  4 ++
 indra/newview/llvoavatar.cpp                  | 41 +++++++++++++----
 indra/newview/llvoavatar.h                    |  4 +-
 .../default/xui/en/floater_my_appearance.xml  |  4 +-
 .../default/xui/en/panel_outfit_edit.xml      | 32 ++++++++++++-
 .../default/xui/en/panel_outfit_gallery.xml   | 45 +++++++++++++++----
 .../xui/en/panel_outfits_inventory.xml        |  2 +-
 .../default/xui/en/panel_outfits_list.xml     | 30 ++++++++++++-
 .../default/xui/en/panel_outfits_wearing.xml  | 20 ++++++++-
 18 files changed, 257 insertions(+), 28 deletions(-)

diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index cd5095e0712..37b2cc8093f 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -48,6 +48,7 @@
 #include "llvoavatar.h"
 #include "llvoavatarself.h"
 #include "llwearableitemslist.h"
+#include "llresmgr.h"
 
 static bool is_tab_header_clicked(LLAccordionCtrlTab* tab, S32 y);
 
@@ -765,6 +766,7 @@ bool is_tab_header_clicked(LLAccordionCtrlTab* tab, S32 y)
 LLOutfitListBase::LLOutfitListBase()
     :   LLPanelAppearanceTab()
     ,   mIsInitialized(false)
+	,	mAvatarComplexityLabel(nullptr)
 {
     mCategoriesObserver = new LLInventoryCategoriesObserver();
     mOutfitMenu = new LLOutfitContextMenu(this);
@@ -843,6 +845,13 @@ void LLOutfitListBase::refreshList(const LLUUID& category_id)
     // Create added and removed items vectors.
     computeDifference(cat_array, vadded, vremoved);
 
+	{
+		std::string count_string;
+		LLLocale locale("");
+		LLResMgr::getInstance()->getIntegerString(count_string, (S32)cat_array.size());
+		getChild<LLTextBox>("OutfitcountText")->setTextArg("COUNT", count_string);
+	}
+
     // Handle added tabs.
     for (uuid_vec_t::const_iterator iter = vadded.begin();
         iter != vadded.end();
@@ -968,6 +977,8 @@ BOOL LLOutfitListBase::postBuild()
 {
     mGearMenu = createGearMenu();
 
+	mAvatarComplexityLabel = getChild<LLTextBox>("avatar_complexity_label");
+
     LLMenuButton* menu_gear_btn = getChild<LLMenuButton>("options_gear_btn");
 
     menu_gear_btn->setMouseDownCallback(boost::bind(&LLOutfitListGearMenuBase::updateItemsVisibility, mGearMenu));
@@ -995,6 +1006,15 @@ void LLOutfitListBase::deselectOutfit(const LLUUID& category_id)
     }
 }
 
+void LLOutfitListBase::updateAvatarComplexity(U32 complexity)
+{
+	std::string complexity_string;
+	LLLocale locale("");
+	LLResMgr::getInstance()->getIntegerString(complexity_string, complexity);
+
+	mAvatarComplexityLabel->setTextArg("[WEIGHT]", complexity_string);
+}
+
 LLContextMenu* LLOutfitContextMenu::createMenu()
 {
     LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index 3020f2eb2f8..7cc76d5fcdc 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -42,6 +42,7 @@ class LLInventoryCategoriesObserver;
 class LLOutfitListGearMenuBase;
 class LLWearableItemsList;
 class LLListContextMenu;
+class LLTextBox;
 
 
 /**
@@ -108,6 +109,8 @@ class LLOutfitListBase : public LLPanelAppearanceTab
 
     virtual bool getHasExpandableFolders() = 0;
 
+	void updateAvatarComplexity(U32 complexity);
+
 protected:
     virtual LLOutfitListGearMenuBase* createGearMenu() = 0;
     virtual void onHighlightBaseOutfit(LLUUID base_id, LLUUID prev_id) = 0;
@@ -124,6 +127,7 @@ class LLOutfitListBase : public LLPanelAppearanceTab
     selection_change_signal_t		mSelectionChangeSignal;
     LLListContextMenu*				mOutfitMenu;
     LLOutfitListGearMenuBase*		mGearMenu;
+	LLTextBox*						mAvatarComplexityLabel;
 };
 
 //////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 8b4c16dbbf0..d31c414b1ba 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -74,6 +74,7 @@
 // [RLVa:KB] - Checked: 2010-09-16 (RLVa-1.2.1a)
 #include "rlvhandler.h"
 // [/RLVa:KB]
+#include "llresmgr.h"
 
 static LLPanelInjector<LLPanelOutfitEdit> t_outfit_edit("panel_outfit_edit");
 
@@ -407,7 +408,9 @@ LLPanelOutfitEdit::LLPanelOutfitEdit()
 	mWearableListManager(NULL),
 	mPlusBtn(NULL),
 	mWearablesGearMenuBtn(NULL),
-	mGearMenuBtn(NULL)
+	mGearMenuBtn(NULL),
+	mAvatarComplexityLabel(NULL),
+	mAvatarComplexityAddingLabel(NULL)
 {
 	mSavedFolderState = new LLSaveFolderState();
 	mSavedFolderState->setApply(FALSE);
@@ -572,6 +575,9 @@ BOOL LLPanelOutfitEdit::postBuild()
 	getChild<LLButton>(SAVE_BTN)->setCommitCallback(boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false));
 	getChild<LLButton>(SAVE_AS_BTN)->setCommitCallback(boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true));
 
+	mAvatarComplexityLabel = getChild<LLTextBox>("avatar_complexity_label");
+	mAvatarComplexityAddingLabel = getChild<LLTextBox>("avatar_complexity_adding_label");
+
 	onOutfitChanging(gAgentWearables.isCOFChangeInProgress());
 	return TRUE;
 }
@@ -1448,4 +1454,13 @@ void LLPanelOutfitEdit::saveOutfit(bool as_new)
 	} 	
 }
 
+void LLPanelOutfitEdit::updateAvatarComplexity(U32 complexity)
+{
+	std::string complexity_string;
+	LLLocale locale("");
+	LLResMgr::getInstance()->getIntegerString(complexity_string, complexity);
+
+	mAvatarComplexityLabel->setTextArg("[WEIGHT]", complexity_string);
+	mAvatarComplexityAddingLabel->setTextArg("[WEIGHT]", complexity_string);
+}
 // EOF
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index d0597fb72bb..107f798802a 100644
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -187,6 +187,8 @@ class LLPanelOutfitEdit : public LLPanel
 									  EAcceptance* accept,
 									  std::string& tooltip_msg);
 
+
+	void updateAvatarComplexity(U32 complexity);
 private:
 	void onAddMoreButtonClicked();
 	void showFilteredWearablesListView(LLWearableType::EType type);
@@ -219,6 +221,8 @@ class LLPanelOutfitEdit : public LLPanel
 	LLButton*			mListViewBtn;
 	LLButton*			mPlusBtn;
 	LLPanel*			mAddWearablesPanel;
+	LLTextBox*			mAvatarComplexityLabel;
+	LLTextBox*			mAvatarComplexityAddingLabel;
 	
 	LLComboBox*			mFolderViewFilterCmbBox;
 	LLComboBox*			mListViewFilterCmbBox;
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index 302b62b6351..d439dadfd70 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -431,3 +431,10 @@ void LLPanelOutfitsInventory::saveOutfit(bool as_new)
 
 	onSave();
 }
+
+void LLPanelOutfitsInventory::updateAvatarComplexity(U32 complexity, const std::map<LLUUID, U32>& item_complexity, const std::map<LLUUID, U32>& temp_item_complexity, U32 body_parts_complexity)
+{
+	mOutfitGalleryPanel->updateAvatarComplexity(complexity);
+	mMyOutfitsPanel->updateAvatarComplexity(complexity);
+	mCurrentOutfitPanel->updateAvatarComplexity(complexity, item_complexity, temp_item_complexity, body_parts_complexity);
+}
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index 5103f4edeac..be821c76f92 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -68,6 +68,8 @@ class LLPanelOutfitsInventory : public LLPanel
 
 	void openApearanceTab(const std::string& tab_name);
 
+	void updateAvatarComplexity(U32 complexity, const std::map<LLUUID, U32>& item_complexity, const std::map<LLUUID, U32>& temp_item_complexity, U32 body_parts_complexity);
+
 protected:
 	void updateVerbs();
 
diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp
index d7b234b31c4..37cc6c236ec 100644
--- a/indra/newview/llpanelwearing.cpp
+++ b/indra/newview/llpanelwearing.cpp
@@ -50,6 +50,9 @@
 #include "rlvcommon.h"
 #include "rlvhandler.h"
 // [/RLVa:KB]
+#include "lltextbox.h"
+#include "llresmgr.h"
+#include "lltrans.h"
 
 // Context menu and Gear menu helper.
 static void edit_outfit()
@@ -234,7 +237,8 @@ static LLPanelInjector<LLPanelWearing> t_panel_wearing("panel_wearing");
 
 LLPanelWearing::LLPanelWearing()
 	:	LLPanelAppearanceTab()
-	,	mCOFItemsList(NULL)
+	,	mCOFItemsList(nullptr)
+	,	mAvatarComplexityLabel(nullptr)
 	,	mIsInitialized(false)
 	,	mAttachmentsChangedConnection()
 {
@@ -278,6 +282,8 @@ BOOL LLPanelWearing::postBuild()
 	mTempItemsList->setFgUnselectedColor(LLColor4::white);
 	mTempItemsList->setRightMouseDownCallback(boost::bind(&LLPanelWearing::onTempAttachmentsListRightClick, this, _1, _2, _3));
 
+	mAvatarComplexityLabel = getChild<LLTextBox>("avatar_complexity_label");
+
 	LLMenuButton* menu_gear_btn = getChild<LLMenuButton>("options_gear_btn");
 
 	menu_gear_btn->setMenu(mGearMenu->getMenu());
@@ -461,9 +467,15 @@ bool LLPanelWearing::populateAttachmentsList(bool update)
 			}
 			else
 			{
-				row["columns"][1]["value"] = "Loading...";
+				row["columns"][1]["value"] = LLTrans::getString("LoadingData");
 				populated = false;
 			}
+			std::string complexity_string;
+			LLLocale locale("");
+			LLResMgr::getInstance()->getIntegerString(complexity_string, mTempItemComplexityMap[attachment->getID()]);
+			row["columns"][2]["column"] = "weight";
+			row["columns"][2]["value"] = complexity_string;
+			row["columns"][2]["halign"] = "right";
 			mTempItemsList->addElement(row);
 			mAttachmentsMap[attachment->getID()] = attachment;
 		}
@@ -626,4 +638,16 @@ void LLPanelWearing::copyToClipboard()
 
 	LLClipboard::instance().copyToClipboard(utf8str_to_wstring(text),0,text.size());
 }
+
+void LLPanelWearing::updateAvatarComplexity(U32 complexity, const std::map<LLUUID, U32>& item_complexity, const std::map<LLUUID, U32>& temp_item_complexity, U32 body_parts_complexity)
+{
+	std::string complexity_string;
+	LLLocale locale("");
+	LLResMgr::getInstance()->getIntegerString(complexity_string, complexity);
+
+	mAvatarComplexityLabel->setTextArg("[WEIGHT]", complexity_string);
+	
+	mTempItemComplexityMap = temp_item_complexity;
+	updateAttachmentsList();
+}
 // EOF
diff --git a/indra/newview/llpanelwearing.h b/indra/newview/llpanelwearing.h
index 715404a457d..e6765dc18f6 100644
--- a/indra/newview/llpanelwearing.h
+++ b/indra/newview/llpanelwearing.h
@@ -41,6 +41,7 @@ class LLListContextMenu;
 class LLScrollListCtrl;
 class LLWearableItemsList;
 class LLWearingGearMenu;
+class LLTextBox;
 
 /**
  * @class LLPanelWearing
@@ -84,6 +85,8 @@ class LLPanelWearing : public LLPanelAppearanceTab
 	void onEditAttachment();
 	void onRemoveAttachment();
 
+	void updateAvatarComplexity(U32 complexity, const std::map<LLUUID, U32>& item_complexity, const std::map<LLUUID, U32>& temp_item_complexity, U32 body_parts_complexity);
+
 private:
 	void onWearableItemsListRightClick(LLUICtrl* ctrl, S32 x, S32 y);
 	void onTempAttachmentsListRightClick(LLUICtrl* ctrl, S32 x, S32 y);
@@ -101,6 +104,9 @@ class LLPanelWearing : public LLPanelAppearanceTab
 	LLAccordionCtrlTab* 			mAttachmentsTab;
 	LLAccordionCtrl*				mAccordionCtrl;
 
+	LLTextBox*						mAvatarComplexityLabel;
+	std::map<LLUUID, U32>			mTempItemComplexityMap;
+
 	std::map<LLUUID, LLViewerObject*> mAttachmentsMap;
 
 	std::map<LLUUID, std::string> 	mObjectNames;
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 0e284e3c078..d5819902b7b 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -76,7 +76,8 @@ LLSidepanelAppearance::LLSidepanelAppearance() :
 	mFilterEditor(NULL),
 	mOutfitEdit(NULL),
 	mCurrOutfitPanel(NULL),
-	mOpened(false)
+	mOpened(false),
+	mLastAvatarComplexity(0)
 {
 	LLOutfitObserver& outfit_observer =  LLOutfitObserver::instance();
 	outfit_observer.addBOFReplacedCallback(boost::bind(&LLSidepanelAppearance::refreshCurrentOutfitName, this, ""));
@@ -565,3 +566,15 @@ bool LLSidepanelAppearance::isWearableEditPanelVisible() const
 	return (mEditWearable) && (mEditWearable->getVisible());
 }
 // [/RLVa:KB]
+
+// static
+void LLSidepanelAppearance::updateAvatarComplexity(U32 complexity, const std::map<LLUUID, U32>& item_complexity, const std::map<LLUUID, U32>& temp_item_complexity, U32 body_parts_complexity)
+{
+	LLSidepanelAppearance* instance = LLFloaterSidePanelContainer::getPanel<LLSidepanelAppearance>("appearance");
+	if (instance->mLastAvatarComplexity != complexity)
+	{
+		instance->mPanelOutfitsInventory->updateAvatarComplexity(complexity, item_complexity, temp_item_complexity, body_parts_complexity);
+		instance->mOutfitEdit->updateAvatarComplexity(complexity);
+	}
+	instance->mLastAvatarComplexity = complexity;
+}
\ No newline at end of file
diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h
index 8ec6d8ad903..4c0a66d5c73 100644
--- a/indra/newview/llsidepanelappearance.h
+++ b/indra/newview/llsidepanelappearance.h
@@ -74,6 +74,8 @@ class LLSidepanelAppearance final : public LLPanel
 	LLPanelEditWearable* getWearableEditPanel() { return mEditWearable; }
 // [/RLVa:KB]
 
+	static void updateAvatarComplexity(U32 complexity, const std::map<LLUUID, U32>& item_complexity, const std::map<LLUUID, U32>& temp_item_complexity, U32 body_parts_complexity);
+
 private:
 	void onFilterEdit(const std::string& search_string);
 	void onVisibilityChanged ( const LLSD& new_visibility );
@@ -103,6 +105,8 @@ class LLSidepanelAppearance final : public LLPanel
 
 	// Gets set to true when we're opened for the first time.
 	bool mOpened;
+
+	U32 mLastAvatarComplexity;
 };
 
 #endif //LL_LLSIDEPANELAPPEARANCE_H
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 7ab0c642f67..6c33a016774 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -120,6 +120,7 @@
 #include "llrendersphere.h"
 
 #include "alcinematicmode.h"
+#include "llsidepanelappearance.h"
 
 extern F32 SPEED_ADJUST_MAX;
 extern F32 SPEED_ADJUST_MAX_SEC;
@@ -10902,7 +10903,9 @@ void LLVOAvatar::accountRenderComplexityForObject(
     const F32 max_attachment_complexity,
     LLVOVolume::texture_cost_t& textures,
     U32& cost,
-    hud_complexity_list_t& hud_complexity_list)
+    hud_complexity_list_t& hud_complexity_list,
+    std::map<LLUUID, U32>& item_complexity,
+    std::map<LLUUID, U32>& temp_item_complexity)
 {
     if (attached_object && !attached_object->isHUDAttachment())
 		{
@@ -10921,12 +10924,12 @@ void LLVOAvatar::accountRenderComplexityForObject(
                             F32 attachment_volume_cost = 0;
                             F32 attachment_texture_cost = 0;
                             F32 attachment_children_cost = 0;
-                const F32 animated_object_attachment_surcharge = 1000;
+			                const F32 animated_object_attachment_surcharge = 1000;
 
-                if (attached_object->isAnimatedObject())
-                {
-                    attachment_volume_cost += animated_object_attachment_surcharge;
-                }
+			                if (attached_object->isAnimatedObject())
+			                {
+			                    attachment_volume_cost += animated_object_attachment_surcharge;
+			                }
 							attachment_volume_cost += volume->getRenderCost(textures);
 
 							const_child_list_t& children = volume->getChildren();
@@ -10957,6 +10960,18 @@ void LLVOAvatar::accountRenderComplexityForObject(
 #endif
                             // Limit attachment complexity to avoid signed integer flipping of the wearer's ACI
                             cost += (U32)llclamp(attachment_total_cost, MIN_ATTACHMENT_COMPLEXITY, max_attachment_complexity);
+
+							if (isSelf())
+							{
+								if (!attached_object->isTempAttachment())
+								{
+									item_complexity.insert(std::make_pair(attached_object->getAttachmentItemID(), (U32)attachment_total_cost));
+								}
+								else
+								{
+									temp_item_complexity.insert(std::make_pair(attached_object->getID(), (U32)attachment_total_cost));
+								}
+							}
 						}
 					}
 				}
@@ -11042,6 +11057,9 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
 		// Diagnostic list of all textures on our avatar
 		static std::set<LLUUID> all_textures;
 
+		std::map<LLUUID, U32> item_complexity;
+		std::map<LLUUID, U32> temp_item_complexity;
+		U32 body_parts_complexity;
 
 		U32 cost = VISUAL_COMPLEXITY_UNKNOWN;
 		LLVOVolume::texture_cost_t textures;
@@ -11077,6 +11095,8 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
         LL_DEBUGS("ARCdetail") << "Avatar body parts complexity: " << cost << LL_ENDL;
 #endif
 
+		body_parts_complexity = cost;
+
         mAttachmentVisibleTriangleCount = 0;
         mAttachmentEstTriangleCount = 0.f;
         mAttachmentSurfaceArea = 0.f;
@@ -11091,7 +11111,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
             if (volp && !volp->isAttachment())
             {
                 accountRenderComplexityForObject(volp, max_attachment_complexity,
-                                                 textures, cost, hud_complexity_list);
+                                                 textures, cost, hud_complexity_list, item_complexity, temp_item_complexity);
             }
         }
 
@@ -11108,7 +11128,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
 				const LLViewerObject* attached_object = iter.first;
 #endif
                 accountRenderComplexityForObject(attached_object, max_attachment_complexity,
-                                                 textures, cost, hud_complexity_list);
+                                                 textures, cost, hud_complexity_list, item_complexity, temp_item_complexity);
 			}
 		}
 
@@ -11182,6 +11202,11 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
             // HUD complexity
             LLHUDRenderNotifier::getInstance()->updateNotificationHUD(hud_complexity_list);
         }
+
+        if (isSelf())
+        {
+            LLSidepanelAppearance::updateAvatarComplexity(mVisualComplexity, item_complexity, temp_item_complexity, body_parts_complexity);
+        }
     }
 }
 
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index a26ae6c2a3b..9f3de4933b4 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -305,7 +305,9 @@ class LLVOAvatar :
                                                      const F32 max_attachment_complexity,
                                                      LLVOVolume::texture_cost_t& textures,
                                                      U32& cost,
-                                                     hud_complexity_list_t& hud_complexity_list);
+                                                     hud_complexity_list_t& hud_complexity_list,
+                                                     std::map<LLUUID, U32>& item_complexity,
+                                                     std::map<LLUUID, U32>& temp_item_complexity);
 	void			calculateUpdateRenderComplexity();
 	static const U32 VISUAL_COMPLEXITY_UNKNOWN;
 	void			updateVisualComplexity();
diff --git a/indra/newview/skins/default/xui/en/floater_my_appearance.xml b/indra/newview/skins/default/xui/en/floater_my_appearance.xml
index 35ad87ceb02..e5c0822c1f0 100644
--- a/indra/newview/skins/default/xui/en/floater_my_appearance.xml
+++ b/indra/newview/skins/default/xui/en/floater_my_appearance.xml
@@ -12,8 +12,8 @@
   single_instance="true"
   reuse_instance="true"
   title="AVATAR"
-  min_height="440"
-  min_width="333"
+  min_height="200"
+  min_width="351"
   width="333">
     <panel
       top="18"
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
index 24e681bf02b..15c97f9b722 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
@@ -387,6 +387,21 @@ It is calculated as border_size + 2*UIResizeBarOverlap
                 left_pad="1"
                 name="dummy_right_icon"
                 width="250" />
+        <text
+                top_delta="0"
+                type="string"
+                length="1"
+                height="25"
+                layout="topleft"
+                right="-36"
+                name="avatar_complexity_label"
+                font="SansSerifMedium"
+                follows="bottom|right"
+                halign="right"
+                v_pad="6"
+                width="150">
+                    Complexity: [WEIGHT]
+        </text>
         <button
                 follows="bottom|right"
                 height="25"
@@ -395,7 +410,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap
                 image_selected="Toolbar_Right_Selected"
                 image_unselected="Toolbar_Right_Off"
                 layout="topleft"
-                left_pad="1"
+                left_pad="6"
                 name="shop_btn_1"
                 top="1"
                 tool_tip="Visit the SL Marketplace. You can also select something you are wearing, then click here to see more things like it"
@@ -462,6 +477,21 @@ It is calculated as border_size + 2*UIResizeBarOverlap
                 name="dummy_right_icon"
                 width="186" >
         </icon>
+        <text
+                top_delta="0"
+                type="string"
+                length="1"
+                height="25"
+                layout="topleft"
+                right="-36"
+                name="avatar_complexity_adding_label"
+                font="SansSerifMedium"
+                follows="bottom|right"
+                halign="right"
+                v_pad="6"
+                width="150">
+                    Complexity: [WEIGHT]
+        </text>
         <button
                 follows="bottom|right"
                 height="25"
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml b/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml
index e3790ae09b2..097e7138fcd 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml
@@ -9,7 +9,7 @@
    layout="topleft"
    left="0"
    top="0"
-   width="318">
+   width="312">
   <string name="outfit_photo_string">
     Photo of "[OUTFIT_NAME]" outfit
   </string>
@@ -22,7 +22,7 @@
   <text
     type="string"
     clip_partial="false"
-    follows="left|top"
+    follows="left|top|right"
     layout="topleft"
     left="13"
     name="no_outfits_txt"
@@ -35,14 +35,13 @@
   </text> 
   <scroll_container
    follows="all"
-   height="400"
-   width="312"
+   height="395"
+   right="310"
    layout="topleft"
-   left="4"
+   left="3"
    top="0"
    name="gallery_scroll_panel"
-   opaque="false"
-   top_pad="0">
+   opaque="false">
    <!--outfit_gallery_item
     layout="topleft"
     left="10"
@@ -91,7 +90,7 @@
 	 height="28"
 	 layout="topleft"
 	 left="4"
-	 top_pad="0"
+	 top_pad="5"
 	 visible="true"
 	 name="bottom_panel"
 	 width="312">
@@ -116,6 +115,34 @@
        left_pad="1"
        name="dummy_icon"
        width="243"/>
+     <text
+       type="string"
+       length="1"
+       height="25"
+       layout="topleft"
+       left_delta="5"
+       name="OutfitcountText"
+       font="SansSerifMedium"
+       follows="bottom|left"
+       v_pad="6"
+       width="100">
+          [COUNT] Outfits
+      </text>
+      <text
+       top_delta="0"
+       type="string"
+       length="1"
+       height="25"
+       layout="topleft"
+       right="-42"
+       name="avatar_complexity_label"
+       font="SansSerifMedium"
+       follows="bottom|right"
+       halign="right"
+       v_pad="6"
+       width="150">
+          Complexity: [WEIGHT]
+      </text>
       <button
        follows="bottom|right"
        height="25"
@@ -124,7 +151,7 @@
        image_selected="Toolbar_Right_Selected"
        image_unselected="Toolbar_Right_Off"
        layout="topleft"
-       left_pad="1"
+       left_pad="6"
        name="trash_btn"
        tool_tip="Delete selected outfit"
        width="31"/>
diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
index 3213d728639..3850d0b331a 100644
--- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
@@ -18,7 +18,7 @@
    </panel.string>
    <panel.string
      name="cof_tab_label">
-     Wearing ([COUNT]/[MAX] Att.)
+     WEARING ([COUNT]/[MAX] Att.)
    </panel.string>
    <tab_container
      follows="all"
diff --git a/indra/newview/skins/default/xui/en/panel_outfits_list.xml b/indra/newview/skins/default/xui/en/panel_outfits_list.xml
index a0096adc016..2d6fbe5d315 100644
--- a/indra/newview/skins/default/xui/en/panel_outfits_list.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfits_list.xml
@@ -61,6 +61,34 @@
        left_pad="1"
        name="dummy_icon"
        width="243"/>
+     <text
+       type="string"
+       length="1"
+       height="25"
+       layout="topleft"
+       left_delta="5"
+       name="OutfitcountText"
+       font="SansSerifMedium"
+       follows="bottom|left"
+       v_pad="6"
+       width="100">
+          [COUNT] Outfits
+      </text>
+     <text
+       top_delta="0"
+       type="string"
+       length="1"
+       height="25"
+       layout="topleft"
+       right="-42"
+       name="avatar_complexity_label"
+       font="SansSerifMedium"
+       follows="bottom|right"
+       halign="right"
+       v_pad="6"
+       width="150">
+          Complexity: [WEIGHT]
+      </text>
       <button
        follows="bottom|right"
        height="25"
@@ -69,7 +97,7 @@
        image_selected="Toolbar_Right_Selected"
        image_unselected="Toolbar_Right_Off"
        layout="topleft"
-       left_pad="1"
+       left_pad="6"
        name="trash_btn"
        tool_tip="Delete selected outfit"
        width="31"/>
diff --git a/indra/newview/skins/default/xui/en/panel_outfits_wearing.xml b/indra/newview/skins/default/xui/en/panel_outfits_wearing.xml
index 42a79743169..6069262da42 100644
--- a/indra/newview/skins/default/xui/en/panel_outfits_wearing.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfits_wearing.xml
@@ -57,7 +57,10 @@
          width="15" />
         <scroll_list.columns
          name="text"
-         width="210" />
+         dynamic_width="true" />
+        <scroll_list.columns
+         name="weight"
+         width="70" />
   </scroll_list>
      </accordion_tab>
      </accordion>
@@ -91,5 +94,20 @@
          left_pad="1"
          name="dummy_icon"
          width="274" />
+        <text
+         top_delta="0"
+         type="string"
+         length="1"
+         height="25"
+         layout="topleft"
+         right="-12"
+         name="avatar_complexity_label"
+         font="SansSerifMedium"
+         follows="bottom|right"
+         halign="right"
+         v_pad="6"
+         width="150">
+            Complexity: [WEIGHT]
+        </text>
     </panel>
 </panel>
-- 
GitLab