From 05a4e9dd8bb13caadd25ef3e71aab43e9b857cd1 Mon Sep 17 00:00:00 2001
From: Dmitry Zaporozhan <dzaporozhan@productengine.com>
Date: Wed, 7 Apr 2010 10:45:39 +0300
Subject: [PATCH] (work in progress) EXT-6564(major) - Fix wearable editing
 panels. Updated layout of all Edit Wearable panels. Disabled editing of
 no-modify wearable. Disabled "Save As" for no-copy wearable.

Reviewed by Mike Antipov https://codereview.productengine.com/secondlife/r/170/

--HG--
branch : product-engine
---
 indra/newview/llpaneleditwearable.cpp         | 21 ++++++-
 indra/newview/llpaneleditwearable.h           |  4 ++
 indra/newview/llpaneloutfitedit.cpp           | 25 ++++++--
 .../skins/default/xui/en/panel_edit_alpha.xml | 53 ++++++++--------
 .../skins/default/xui/en/panel_edit_eyes.xml  | 55 ++++++++++++-----
 .../default/xui/en/panel_edit_gloves.xml      | 51 +++++++++++-----
 .../skins/default/xui/en/panel_edit_hair.xml  | 55 +++++++++++++----
 .../default/xui/en/panel_edit_jacket.xml      | 61 +++++++++++++------
 .../skins/default/xui/en/panel_edit_pants.xml | 51 +++++++++++-----
 .../skins/default/xui/en/panel_edit_shape.xml |  4 +-
 .../skins/default/xui/en/panel_edit_shirt.xml | 47 ++++++++++----
 .../skins/default/xui/en/panel_edit_shoes.xml | 51 +++++++++++-----
 .../skins/default/xui/en/panel_edit_skin.xml  | 57 ++++++++++++-----
 .../skins/default/xui/en/panel_edit_skirt.xml | 51 +++++++++++-----
 .../skins/default/xui/en/panel_edit_socks.xml | 51 +++++++++++-----
 .../default/xui/en/panel_edit_tattoo.xml      | 37 ++++++-----
 .../default/xui/en/panel_edit_underpants.xml  | 51 +++++++++++-----
 .../default/xui/en/panel_edit_undershirt.xml  | 51 +++++++++++-----
 .../default/xui/en/panel_edit_wearable.xml    |  4 +-
 19 files changed, 556 insertions(+), 224 deletions(-)

diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index c0528da9996..da74295f9e6 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -270,6 +270,8 @@ LLEditWearableDictionary::SubpartEntry::SubpartEntry(ESubpart part,
 
 LLPanelEditWearable::LLPanelEditWearable()
 	: LLPanel()
+	, mWearablePtr(NULL)
+	, mWearableItem(NULL)
 {
 }
 
@@ -338,8 +340,7 @@ BOOL LLPanelEditWearable::isDirty() const
 //virtual
 void LLPanelEditWearable::draw()
 {
-	BOOL is_dirty = isDirty();
-	mBtnRevert->setEnabled(is_dirty);
+	updateVerbs();
 
 	LLPanel::draw();
 }
@@ -401,6 +402,9 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show)
 		return;
 	}
 
+	mWearableItem = gInventory.getItem(mWearablePtr->getItemID());
+	llassert(mWearableItem);
+
 	EWearableType type = wearable->getType();
 	LLPanel *targetPanel = NULL;
 	std::string title;
@@ -489,6 +493,7 @@ void LLPanelEditWearable::initializePanel()
 
 		updateScrollingPanelUI();
 	}
+	updateVerbs();
 }
 
 void LLPanelEditWearable::updateScrollingPanelUI()
@@ -645,7 +650,19 @@ void LLPanelEditWearable::buildParamList(LLScrollingPanelList *panel_list, value
 	}
 }
 
+void LLPanelEditWearable::updateVerbs()
+{
+	bool can_copy = false;
 
+	if(mWearableItem)
+	{
+		can_copy = mWearableItem->getPermissions().allowCopyBy(gAgentID);
+	}
 
+	BOOL is_dirty = isDirty();
 
+	mBtnRevert->setEnabled(is_dirty);
+	childSetEnabled("save_as_button", is_dirty && can_copy);
+}
 
+// EOF
diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h
index 41786596176..8b63685177b 100644
--- a/indra/newview/llpaneleditwearable.h
+++ b/indra/newview/llpaneleditwearable.h
@@ -41,6 +41,7 @@
 class LLWearable;
 class LLTextEditor;
 class LLTextBox;
+class LLViewerInventoryItem;
 class LLViewerVisualParam;
 class LLVisualParamHint;
 class LLViewerJointMesh;
@@ -73,9 +74,12 @@ class LLPanelEditWearable : public LLPanel
 	LLPanel*			getPanel(EWearableType type);
 	void				getSortedParams(value_map_t &sorted_params, const std::string &edit_group);
 	void				buildParamList(LLScrollingPanelList *panel_list, value_map_t &sorted_params, LLAccordionCtrlTab *tab);
+	// update bottom bar buttons ("Save", "Revert", etc)
+	void				updateVerbs();
 
 	// the pointer to the wearable we're editing. NULL means we're not editing a wearable.
 	LLWearable *mWearablePtr;
+	LLViewerInventoryItem* mWearableItem;
 
 	// these are constant no matter what wearable we're editing
 	LLButton *mBtnRevert;
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 1ab2100a414..b9560041293 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -367,19 +367,32 @@ void LLPanelOutfitEdit::onUpClicked(void)
 void LLPanelOutfitEdit::onEditWearableClicked(void)
 {
 	LLUUID id_to_edit = mLookContents->getSelectionInterface()->getCurrentID();
-
 	LLViewerInventoryItem * item_to_edit = gInventory.getItem(id_to_edit);
 
 	if (item_to_edit)
 	{
 		// returns null if not a wearable (attachment, etc).
 		LLWearable* wearable_to_edit = gAgentWearables.getWearableFromAssetID(item_to_edit->getAssetUUID());
-		if (!wearable_to_edit || !wearable_to_edit->getPermissions().allowModifyBy(gAgent.getID()) )
-		{											 
-			LLSidepanelAppearance::editWearable(wearable_to_edit, getParent());
-			if (mEditWearableBtn->getVisible())
+		if(wearable_to_edit)
+		{
+			bool can_modify = false;
+			bool is_complete = item_to_edit->isComplete();
+			// if item_to_edit is a link, its properties are not appropriate, 
+			// lets get original item with actual properties
+			LLViewerInventoryItem* original_item = gInventory.getItem(wearable_to_edit->getItemID());
+			if(original_item)
 			{
-				mEditWearableBtn->setVisible(FALSE);
+				can_modify = original_item->getPermissions().allowModifyBy(gAgentID);
+				is_complete = original_item->isComplete();
+			}
+
+			if (can_modify && is_complete)
+			{											 
+				LLSidepanelAppearance::editWearable(wearable_to_edit, getParent());
+				if (mEditWearableBtn->getVisible())
+				{
+					mEditWearableBtn->setVisible(FALSE);
+				}
 			}
 		}
 	}
diff --git a/indra/newview/skins/default/xui/en/panel_edit_alpha.xml b/indra/newview/skins/default/xui/en/panel_edit_alpha.xml
index 40647e1b81c..1d0c0a02b0e 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_alpha.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_alpha.xml
@@ -1,33 +1,38 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
  <panel
+     background_visible="true"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
-	 left="10"
+	 left="0"
 	 name="edit_alpha_panel"
 	 top_pad="10"
-	 width="313" >
+	 width="333" >
    <panel
-      border="true"
-      follows="left|top|right" 
-      height="180" 
+      border="false"
+      bg_alpha_color="DkGray2"
+      bg_opaque_color="DkGray2"
+      background_visible="true"
+      background_opaque="true"
+      follows="top|left|right"
+      height="400" 
       left="10" 
       layout="topleft" 
       name="avatar_alpha_color_panel"
       top="0"
-      width="293" >
+      width="313" >
        <texture_picker
         can_apply_immediately="true"
         default_image_name="Default"
         follows="left|top"
-        height="80"
+        height="100"
         label="Lower Alpha"
         layout="topleft"
-        left="10"
+        left="30"
         name="Lower Alpha"
         tool_tip="Click to choose a picture"
         top="10"
-        width="64" />
+        width="94" />
        <check_box
         control_name="LowerAlphaTextureInvisible"
         follows="left"
@@ -41,14 +46,14 @@
         can_apply_immediately="true"
         default_image_name="Default"
         follows="left|top"
-        height="80"
+        height="100"
         label="Upper Alpha"
         layout="topleft"
-        left_pad="10"
+        left_pad="20"
         name="Upper Alpha"
         tool_tip="Click to choose a picture"
         top="10"
-        width="64" />
+        width="94" />
        <check_box
         control_name="UpperAlphaTextureInvisible"
         follows="left"
@@ -62,14 +67,14 @@
         can_apply_immediately="true"
         default_image_name="Default"
         follows="left|top"
-        height="80"
+        height="100"
         label="Head Alpha"
         layout="topleft"
-        left_pad="10"
+        left="30"
         name="Head Alpha"
         tool_tip="Click to choose a picture"
-        top="10"
-        width="64" />
+        top="120"
+        width="94" />
        <check_box
         control_name="HeadAlphaTextureInvisible"
         follows="left"
@@ -83,14 +88,14 @@
         can_apply_immediately="true"
         default_image_name="Default"
         follows="left|top"
-        height="80"
+        height="100"
         label="Eye Alpha"
         layout="topleft"
-        left="10"
+        left_pad="20"
         name="Eye Alpha"
         tool_tip="Click to choose a picture"
-        top="100"
-        width="64" />
+        top="120"
+        width="94" />
        <check_box
         control_name="Eye AlphaTextureInvisible"
         follows="left"
@@ -104,14 +109,14 @@
         can_apply_immediately="true"
         default_image_name="Default"
         follows="left|top"
-        height="80"
+        height="100"
         label="Hair Alpha"
         layout="topleft"
-        left_pad="10"
+        left="30"
         name="Hair Alpha"
         tool_tip="Click to choose a picture"
-        top_delta="-4"
-        width="64" />
+        top="230"
+        width="94" />
        <check_box
         control_name="HairAlphaTextureInvisible"
         follows="left"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_eyes.xml b/indra/newview/skins/default/xui/en/panel_edit_eyes.xml
index c514054c41c..f11ef43c76f 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_eyes.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_eyes.xml
@@ -1,21 +1,26 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
  <panel
+     background_visible="true"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
-	 left="10"
+	 left="0"
 	 name="edit_eyes_panel"
 	 top_pad="10"
-	 width="313" >
+	 width="333" >
 	 <panel
-	  border="true"
-	  follows="left|top|right" 
-	  height="100" 
+	  border="false"
+      bg_alpha_color="DkGray2"
+      bg_opaque_color="DkGray2"
+      background_visible="true"
+      background_opaque="true"
+	  follows="top|left|right"
+	  height="90" 
 	  left="10" 
 	  layout="topleft" 
 	  name="avatar_eye_color_panel"
 	  top="0"
-	  width="293" >
+	  width="313" >
        <texture_picker
              can_apply_immediately="true"
              default_image_name="Default"
@@ -23,31 +28,49 @@
              height="80"
              label="Iris"
              layout="topleft"
-             left="8"
+             left="10"
              name="Iris"
              tool_tip="Click to choose a picture"
-             top_pad="10"
+             top="10"
              width="64" />
 	 </panel>
-	 <accordion
-		follows="left|top|right|bottom"
-		height ="340"
-		left="10"
-		name="wearable_accordion"
-		top_pad="10"
-		width="303">
-		<accordion_tab
+     <panel
+         border="false"
+         bg_alpha_color="DkGray2"
+         bg_opaque_color="DkGray2"
+         background_visible="true"
+         background_opaque="true"
+         follows="all"
+         height="300"
+         layout="topleft"
+         left="10"
+         name="accordion_panel"
+         top_pad="10"
+         width="313">
+     <accordion
+        follows="all"
+        height ="300"
+        layout="topleft"
+        left="0"
+        name="wearable_accordion"
+        single_expansion="true"
+        top="0"
+        width="313">
+        <accordion_tab
 			layout="topleft"
+            fit_panel="false"
 			min_height="150"
 			name="eyes_main_tab"
 			title="Eyes">
 			<scrolling_panel_list
 				follows="all"
+                layout="topleft"
 				left="0"
 				name="eyes_main_param_list"
 				top="0"
 				width="303" />
 		</accordion_tab>
 	</accordion>
+    </panel>
 </panel>
 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_gloves.xml b/indra/newview/skins/default/xui/en/panel_edit_gloves.xml
index 7aca40e8d9d..7d8eed50854 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_gloves.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_gloves.xml
@@ -1,21 +1,26 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
  <panel
+     background_visible="true"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
-	 left="10"
+	 left="0"
 	 name="edit_gloves_panel"
 	 top_pad="10"
-	 width="313" >
+	 width="333" >
 	 <panel
-	  border="true"
-	  follows="left|top|right" 
-	  height="100" 
+	  border="false"
+      bg_alpha_color="DkGray2"
+      bg_opaque_color="DkGray2"
+      background_visible="true"
+      background_opaque="true"
+	  follows="top|left|right"
+	  height="90" 
 	  left="10" 
 	  layout="topleft" 
 	  name="avatar_gloves_color_panel"
 	  top="0"
-	  width="293" >
+	  width="313" >
        <texture_picker
         can_apply_immediately="true"
         default_image_name="Default"
@@ -34,31 +39,49 @@
         height="80"
         label="Color/Tint"
         layout="topleft"
-        left_pad="10"
+        left_pad="20"
         name="Color/Tint"
         tool_tip="Click to open color picker"
         top="10"
         width="64" />
 	 </panel>
-	 <accordion
-		follows="left|top|right|bottom"
-		height ="340"
-		left="10"
-		name="wearable_accordion"
-		top_pad="10"
-		width="303">
+	 <panel
+         border="false"
+         bg_alpha_color="DkGray2"
+         bg_opaque_color="DkGray2"
+         background_visible="true"
+         background_opaque="true"
+         follows="all"
+         height="300"
+         layout="topleft"
+         left="10"
+         name="accordion_panel"
+         top_pad="10"
+         width="313">
+     <accordion
+        follows="all"
+        height ="300"
+        layout="topleft"
+        left="0"
+        name="wearable_accordion"
+        single_expansion="true"
+        top="0"
+        width="313">
 		<accordion_tab
 			layout="topleft"
+            fit_panel="false"
 			min_height="150"
 			name="gloves_main_tab"
 			title="Gloves">
 			<scrolling_panel_list
 				follows="all"
+                layout="topleft"
 				left="0"
 				name="gloves_main_param_list"
 				top="0"
 				width="303" />
 		</accordion_tab>
 	</accordion>
+    </panel>
 </panel>
 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_hair.xml b/indra/newview/skins/default/xui/en/panel_edit_hair.xml
index e7d1c053016..cd81aa2c4fd 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_hair.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_hair.xml
@@ -1,21 +1,26 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
  <panel
+     background_visible="true"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
-	 left="10"
+	 left="0"
 	 name="edit_hair_panel"
 	 top_pad="10"
-	 width="313" >
+	 width="333" >
 	 <panel
-	  border="true"
-	  follows="left|top|right" 
-	  height="100" 
+	  border="false"
+      bg_alpha_color="DkGray2"
+      bg_opaque_color="DkGray2"
+      background_visible="true"
+      background_opaque="true"
+	  follows="top|left|right"
+	  height="90" 
 	  left="10" 
 	  layout="topleft" 
 	  name="avatar_hair_color_panel"
 	  top="0"
-	  width="293" > 
+	  width="313" > 
             <texture_picker
              can_apply_immediately="true"
              default_image_name="Default"
@@ -23,26 +28,43 @@
              height="80"
              label="Texture"
              layout="topleft"
-             left="8"
+             left="10"
              name="Texture"
              tool_tip="Click to choose a picture"
              top="10"
              width="64" />
 	 </panel>
+   <panel
+         border="false"
+         bg_alpha_color="DkGray2"
+         bg_opaque_color="DkGray2"
+         background_visible="true"
+         background_opaque="true"
+         follows="all"
+         height="300"
+         layout="topleft"
+         left="10"
+         name="accordion_panel"
+         top_pad="10"
+         width="313">
    <accordion 
-		follows="left|top|right|bottom"
-		height ="340"
-		left="10"
-		name="wearable_accordion"
-		top_pad="10"
-		width="303">
+        follows="all"
+        height ="300"
+        layout="topleft"
+        left="0"
+        name="wearable_accordion"
+        single_expansion="true"
+        top="0"
+        width="313">
 		<accordion_tab
 			layout="topleft"
+            fit_panel="false"
 			min_height="150"
 			name="hair_color_tab"
 			title="Color">
 			<scrolling_panel_list
 				follows="all"
+                layout="topleft"
 				left="0"
 				name="hair_color_param_list"
 				top="0"
@@ -50,11 +72,13 @@
 		</accordion_tab>
 		<accordion_tab
 			layout="topleft"
+            fit_panel="false"
 			min_height="150"
 			name="hair_style_tab"
 			title="Style">
 			<scrolling_panel_list
 				follows="all"
+                layout="topleft"
 				left="0"
 				name="hair_style_param_list"
 				top="0"
@@ -62,11 +86,13 @@
 		</accordion_tab>
 		<accordion_tab
 			layout="topleft"
+            fit_panel="false"
 			min_height="150"
 			name="hair_eyebrows_tab"
 			title="Eyebrows">
 			<scrolling_panel_list
 				follows="all"
+                layout="topleft"
 				left="0"
 				name="hair_eyebrows_param_list"
 				top="0"
@@ -74,16 +100,19 @@
 		</accordion_tab>
 		<accordion_tab
 			layout="topleft"
+            fit_panel="false"
 			min_height="150"
 			name="hair_facial_tab"
 			title="Facial">
 			<scrolling_panel_list
 				follows="all"
+                layout="topleft"
 				left="0"
 				name="hair_facial_param_list"
 				top="0"
 				width="303" />
 		</accordion_tab>
 	</accordion>
+    </panel>
 </panel>
 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_jacket.xml b/indra/newview/skins/default/xui/en/panel_edit_jacket.xml
index ed92b1e0f85..ba038659376 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_jacket.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_jacket.xml
@@ -1,21 +1,26 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
  <panel
+     background_visible="true"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
-	 left="10"
+	 left="0"
 	 name="edit_jacket_panel"
 	 top_pad="10"
-	 width="313" >
+	 width="333" >
 	 <panel
-	  border="true"
-	  follows="left|top|right" 
-	  height="100" 
+	  border="false"
+      bg_alpha_color="DkGray2"
+      bg_opaque_color="DkGray2"
+      background_visible="true"
+      background_opaque="true"
+	  follows="top|left|right"
+	  height="90" 
 	  left="10" 
 	  layout="topleft" 
 	  name="avatar_jacket_color_panel"
 	  top="0"
-	  width="293" >
+	  width="313" >
        <texture_picker
         can_apply_immediately="true"
         default_image_name="Default"
@@ -23,11 +28,11 @@
         height="80"
         label="Upper Fabric"
         layout="topleft"
-        left="10"
+        left="25"
         name="Upper Fabric"
         tool_tip="Click to choose a picture"
         top="10"
-        width="64" />
+        width="74" />
        <texture_picker
         can_apply_immediately="true"
         default_image_name="Default"
@@ -35,42 +40,60 @@
         height="80"
         label="Lower Fabric"
         layout="topleft"
-        left_pad="10"
+        left_pad="20"
         name="Lower Fabric"
         tool_tip="Click to choose a picture"
         top="10"
-        width="64" />
+        width="74" />
        <color_swatch
         can_apply_immediately="true"
         follows="left|top"
         height="80"
         label="Color/Tint"
         layout="topleft"
-        left_pad="10"
+        left_pad="20"
         name="Color/Tint"
         tool_tip="Click to open color picker"
         top="10"
-        width="64" />
+        width="74" />
 	 </panel>
-	 <accordion
-		follows="left|top|right|bottom"
-		height ="340"
-		left="10"
-		name="wearable_accordion"
-		top_pad="10"
-		width="303">
+	 <panel
+         border="false"
+         bg_alpha_color="DkGray2"
+         bg_opaque_color="DkGray2"
+         background_visible="true"
+         background_opaque="true"
+         follows="all"
+         height="300"
+         layout="topleft"
+         left="10"
+         name="accordion_panel"
+         top_pad="10"
+         width="313">
+     <accordion
+        follows="all"
+        height ="300"
+        layout="topleft"
+        left="0"
+        name="wearable_accordion"
+        single_expansion="true"
+        top="0"
+        width="313">
 		<accordion_tab
 			layout="topleft"
+            fit_panel="false"
 			min_height="150"
 			name="jacket_main_tab"
 			title="Jacket">
 			<scrolling_panel_list
 				follows="all"
+                layout="topleft"
 				left="0"
 				name="jacket_main_param_list"
 				top="0"
 				width="303" />
 		</accordion_tab>
 	</accordion>
+    </panel>
 </panel>
 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_pants.xml b/indra/newview/skins/default/xui/en/panel_edit_pants.xml
index b764188e04d..5b02d1f9686 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_pants.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_pants.xml
@@ -1,21 +1,26 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
  <panel
+     background_visible="true"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
-	 left="10"
+	 left="0"
 	 name="edit_pants_panel"
 	 top_pad="10"
-	 width="313" >
+	 width="333" >
 	 <panel
-	  border="true"
-	  follows="left|top|right" 
-	  height="100" 
+	  border="false"
+      bg_alpha_color="DkGray2"
+      bg_opaque_color="DkGray2"
+      background_visible="true"
+      background_opaque="true"
+	  follows="top|left|right"
+	  height="90" 
 	  left="10" 
 	  layout="topleft" 
 	  name="avatar_pants_color_panel"
 	  top="0"
-	  width="293" >
+	  width="313" >
        <texture_picker
         can_apply_immediately="true"
         default_image_name="Default"
@@ -34,31 +39,49 @@
         height="80"
         label="Color/Tint"
         layout="topleft"
-        left_pad="10"
+        left_pad="20"
         name="Color/Tint"
         tool_tip="Click to open color picker"
         top="10"
         width="64" />
 	 </panel>
-	 <accordion
-		follows="left|top|right|bottom"
-		height ="340"
-		left="10"
-		name="wearable_accordion"
-		top_pad="10"
-		width="303">
+     <panel
+         border="false"
+         bg_alpha_color="DkGray2"
+         bg_opaque_color="DkGray2"
+         background_visible="true"
+         background_opaque="true"
+         follows="all"
+         height="300"
+         layout="topleft"
+         left="10"
+         name="accordion_panel"
+         top_pad="10"
+         width="313">
+   <accordion 
+        follows="all"
+        height ="300"
+        layout="topleft"
+        left="0"
+        name="wearable_accordion"
+        single_expansion="true"
+        top="0"
+        width="313">
 		<accordion_tab
 			layout="topleft"
+            fit_panel="false"
 			min_height="150"
 			name="pants_main_tab"
 			title="Pants">
 			<scrolling_panel_list
 				follows="all"
+                layout="topleft"
 				left="0"
 				name="pants_main_param_list"
 				top="0"
 				width="303" />
 		</accordion_tab>
 	</accordion>
+    </panel>
 </panel>
 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_shape.xml b/indra/newview/skins/default/xui/en/panel_edit_shape.xml
index 9a3b5c26ecf..e1c574001a7 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_shape.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_shape.xml
@@ -4,7 +4,7 @@
 	 follows="all"
 	 height="400"
 	 layout="topleft"
-	 left="10"
+	 left="0"
 	 name="edit_shape_panel"
 	 top_pad="10"
 	 width="333" >
@@ -14,7 +14,7 @@
          bg_opaque_color="DkGray2"
          background_visible="true"
          background_opaque="true"
-		 follows="top|left"
+		 follows="top|left|right"
 		 height="50"
 		 left="10"
 		 layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_shirt.xml b/indra/newview/skins/default/xui/en/panel_edit_shirt.xml
index 4b7235545f2..7da8de4c0bf 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_shirt.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_shirt.xml
@@ -1,21 +1,26 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
  <panel
+     background_visible="true"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
-	 left="10"
+	 left="0"
 	 name="edit_shirt_panel"
 	 top_pad="10"
-	 width="313" >
+	 width="333" >
 	 <panel
-	  border="true"
-	  follows="left|top|right" 
-	  height="100" 
+	  border="false"
+      bg_alpha_color="DkGray2"
+      bg_opaque_color="DkGray2"
+      background_visible="true"
+      background_opaque="true"
+	  follows="top|left|right"
+	  height="90" 
 	  left="10" 
 	  layout="topleft" 
 	  name="avatar_shirt_color_panel"
 	  top="0"
-	  width="293" >
+	  width="313" >
        <texture_picker
         can_apply_immediately="true"
         default_image_name="Default"
@@ -34,31 +39,49 @@
         height="80"
         label="Color/Tint"
         layout="topleft"
-        left_pad="10"
+        left_pad="20"
         name="Color/Tint"
         tool_tip="Click to open color picker"
         top="10"
         width="64" />
 	 </panel>
+     <panel
+         border="false"
+         bg_alpha_color="DkGray2"
+         bg_opaque_color="DkGray2"
+         background_visible="true"
+         background_opaque="true"
+         follows="all"
+         height="300"
+         layout="topleft"
+         left="10"
+         name="accordion_panel"
+         top_pad="10"
+         width="313">
 	 <accordion
-		follows="left|top|right|bottom"
-		height ="340"
-		left="10"
+		follows="all"
+		height ="300"
+        layout="topleft"
+		left="0"
 		name="wearable_accordion"
-		top_pad="10"
-		width="303">
+        single_expansion="true"
+		top="0"
+		width="313">
 		<accordion_tab
 			layout="topleft"
+            fit_panel="false"
 			min_height="150"
 			name="shirt_main_tab"
 			title="Shirt">
 			<scrolling_panel_list
 				follows="all"
+                layout="topleft"
 				left="0"
 				name="shirt_main_param_list"
 				top="0"
 				width="303" />
 		</accordion_tab>
 	</accordion>
+    </panel>
 </panel>
 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_shoes.xml b/indra/newview/skins/default/xui/en/panel_edit_shoes.xml
index e886afa0102..84fe26f7f63 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_shoes.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_shoes.xml
@@ -1,21 +1,26 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
  <panel
+     background_visible="true"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
-	 left="10"
+	 left="0"
 	 name="edit_shoes_panel"
 	 top_pad="10"
-	 width="313" >
+	 width="333" >
    <panel
-      border="true"
-      follows="left|top|right" 
-      height="100" 
+      border="false"
+      bg_alpha_color="DkGray2"
+      bg_opaque_color="DkGray2"
+      background_visible="true"
+      background_opaque="true"
+      follows="top|left|right"
+      height="90" 
       left="10" 
       layout="topleft" 
       name="avatar_shoes_color_panel"
       top="0"
-      width="293" >
+      width="313" >
        <texture_picker
         can_apply_immediately="true"
         default_image_name="Default"
@@ -34,31 +39,49 @@
         height="80"
         label="Color/Tint"
         layout="topleft"
-        left_pad="10"
+        left_pad="20"
         name="Color/Tint"
         tool_tip="Click to open color picker"
         top="10"
         width="64" />
 	 </panel>
-	 <accordion
-		follows="left|top|right|bottom"
-		height ="340"
-		left="10"
-		name="wearable_accordion"
-		top_pad="10"
-		width="303">
+     <panel
+         border="false"
+         bg_alpha_color="DkGray2"
+         bg_opaque_color="DkGray2"
+         background_visible="true"
+         background_opaque="true"
+         follows="all"
+         height="300"
+         layout="topleft"
+         left="10"
+         name="accordion_panel"
+         top_pad="10"
+         width="313">
+   <accordion 
+        follows="all"
+        height ="300"
+        layout="topleft"
+        left="0"
+        name="wearable_accordion"
+        single_expansion="true"
+        top="0"
+        width="313">
 		<accordion_tab
 			layout="topleft"
+            fit_panel="false"
 			min_height="150"
 			name="shoes_main_tab"
 			title="Shoes">
 			<scrolling_panel_list
 				follows="all"
+                layout="topleft"
 				left="0"
 				name="shoes_main_param_list"
 				top="0"
 				width="303" />
 		</accordion_tab>
 	</accordion>
+    </panel>
 </panel>
 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_skin.xml b/indra/newview/skins/default/xui/en/panel_edit_skin.xml
index 918606b54ca..b5c8c954730 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_skin.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_skin.xml
@@ -1,21 +1,26 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
  <panel
+     background_visible="true"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
-	 left="10"
+	 left="0"
 	 name="edit_skin_panel"
 	 top_pad="10"
-	 width="313" >
+	 width="333" >
 	 <panel
-	  border="true"
-	  follows="left|top|right" 
-	  height="100" 
+	  border="false"
+      bg_alpha_color="DkGray2"
+      bg_opaque_color="DkGray2"
+      background_visible="true"
+      background_opaque="true"
+	  follows="top|left|right"
+	  height="90" 
 	  left="10" 
 	  layout="topleft" 
 	  name="avatar_skin_color_panel"
 	  top="0"
-	  width="293" >
+	  width="313" >
        <texture_picker
         allow_no_texture="true"
         can_apply_immediately="true"
@@ -24,7 +29,7 @@
         height="80"
         label="Head Tattoos"
         layout="topleft"
-        left="10"
+        left="25"
         name="Head Tattoos"
         tool_tip="Click to choose a picture"
         top="10"
@@ -37,7 +42,7 @@
         height="80"
         label="Upper Tattoos"
         layout="topleft"
-        left_pad="10"
+        left_pad="20"
         name="Upper Tattoos"
         tool_tip="Click to choose a picture"
         top="10"
@@ -50,26 +55,43 @@
         height="80"
         label="Lower Tattoos"
         layout="topleft"
-        left_pad="10"
+        left_pad="20"
         name="Lower Tattoos"
         tool_tip="Click to choose a picture"
         top="10"
         width="74" />
 	 </panel>
+     <panel
+         border="false"
+         bg_alpha_color="DkGray2"
+         bg_opaque_color="DkGray2"
+         background_visible="true"
+         background_opaque="true"
+         follows="all"
+         height="300"
+         layout="topleft"
+         left="10"
+         name="accordion_panel"
+         top_pad="10"
+         width="313">    
 	 <accordion
-		follows="left|top|right|bottom"
-		height ="340"
-		left="10"
+        layout="topleft"
+		follows="all"
+		height ="300"
+		left="0"
 		name="wearable_accordion"
-		top_pad="10"
-		width="303">
+		top="0"
+        single_expansion="true"
+		width="313">
 		<accordion_tab
 			layout="topleft"
+            fit_panel="false"
 			min_height="150"
 			name="skin_color_tab"
 			title="Skin Color">
 			<scrolling_panel_list
 				follows="all"
+                layout="topleft"
 				left="0"
 				name="skin_color_param_list"
 				top="0"
@@ -77,11 +99,13 @@
 		</accordion_tab>
 		<accordion_tab
 			layout="topleft"
+            fit_panel="false"
 			min_height="150"
 			name="skin_face_tab"
 			title="Face Detail">
 			<scrolling_panel_list
 				follows="all"
+                layout="topleft"
 				left="0"
 				name="skin_face_param_list"
 				top="0"
@@ -89,11 +113,13 @@
 		</accordion_tab>
 		<accordion_tab
 			layout="topleft"
+            fit_panel="false"
 			min_height="150"
 			name="skin_makeup_tab"
 			title="Makeup">
 			<scrolling_panel_list
 				follows="all"
+                layout="topleft"
 				left="0"
 				name="skin_makeup_param_list"
 				top="0"
@@ -101,16 +127,19 @@
 		</accordion_tab>
 		<accordion_tab
 			layout="topleft"
+            fit_panel="false"
 			min_height="150"
 			name="skin_body_tab"
 			title="Body Detail">
 			<scrolling_panel_list
 				follows="all"
+                layout="topleft"
 				left="0"
 				name="skin_body_param_list"
 				top="0"
 				width="303" />
 		</accordion_tab>
 	</accordion>
+    </panel>
 </panel>
 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_skirt.xml b/indra/newview/skins/default/xui/en/panel_edit_skirt.xml
index 6cccab18430..16f6950bd52 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_skirt.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_skirt.xml
@@ -1,21 +1,26 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
  <panel
+     background_visible="true"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
-	 left="10"
+	 left="0"
 	 name="edit_skirt_panel"
 	 top_pad="10"
-	 width="313" >
+	 width="333" >
    <panel
-      border="true"
-      follows="left|top|right" 
-      height="100" 
+      border="false"
+      bg_alpha_color="DkGray2"
+      bg_opaque_color="DkGray2"
+      background_visible="true"
+      background_opaque="true"
+      follows="top|left|right"
+      height="90" 
       left="10" 
       layout="topleft" 
       name="avatar_skirt_color_panel"
       top="0"
-      width="293" >
+      width="313" >
        <texture_picker
         can_apply_immediately="true"
         default_image_name="Default"
@@ -34,31 +39,49 @@
         height="80"
         label="Color/Tint"
         layout="topleft"
-        left_pad="10"
+        left_pad="20"
         name="Color/Tint"
         tool_tip="Click to open color picker"
         top="10"
         width="64" />
 	 </panel>
-	 <accordion
-		follows="left|top|right|bottom"
-		height ="340"
-		left="10"
-		name="wearable_accordion"
-		top_pad="10"
-		width="303">
+	 <panel
+         border="false"
+         bg_alpha_color="DkGray2"
+         bg_opaque_color="DkGray2"
+         background_visible="true"
+         background_opaque="true"
+         follows="all"
+         height="300"
+         layout="topleft"
+         left="10"
+         name="accordion_panel"
+         top_pad="10"
+         width="313">
+     <accordion
+        follows="all"
+        height ="300"
+        layout="topleft"
+        left="0"
+        name="wearable_accordion"
+        single_expansion="true"
+        top="0"
+        width="313">
 		<accordion_tab
 			layout="topleft"
+            fit_panel="false"
 			min_height="150"
 			name="skirt_main_tab"
 			title="Skirt">
 			<scrolling_panel_list
 				follows="all"
+                layout="topleft"
 				left="0"
 				name="skirt_main_param_list"
 				top="0"
 				width="303" />
 		</accordion_tab>
 	</accordion>
+    </panel>
 </panel>
 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_socks.xml b/indra/newview/skins/default/xui/en/panel_edit_socks.xml
index fc7de007146..e4f916703b0 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_socks.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_socks.xml
@@ -1,21 +1,26 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
  <panel
+     background_visible="true"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
-	 left="10"
+	 left="0"
 	 name="edit_socks_panel"
 	 top_pad="10"
-	 width="313" >
+	 width="333" >
 	 <panel
-	  border="true"
-	  follows="left|top|right" 
-	  height="100" 
+	  border="false"
+      bg_alpha_color="DkGray2"
+      bg_opaque_color="DkGray2"
+      background_visible="true"
+      background_opaque="true"
+	  follows="top|left|right"
+	  height="90" 
 	  left="10" 
 	  layout="topleft" 
 	  name="avatar_socks_color_panel"
 	  top="0"
-	  width="293" >
+	  width="313" >
        <texture_picker
         can_apply_immediately="true"
         default_image_name="Default"
@@ -34,31 +39,49 @@
         height="80"
         label="Color/Tint"
         layout="topleft"
-        left_pad="10"
+        left_pad="20"
         name="Color/Tint"
         tool_tip="Click to open color picker"
         top="10"
         width="64" />
 	 </panel>
-	 <accordion
-		follows="left|top|right|bottom"
-		height ="340"
-		left="10"
-		name="wearable_accordion"
-		top_pad="10"
-		width="303">
+	 <panel
+         border="false"
+         bg_alpha_color="DkGray2"
+         bg_opaque_color="DkGray2"
+         background_visible="true"
+         background_opaque="true"
+         follows="all"
+         height="300"
+         layout="topleft"
+         left="10"
+         name="accordion_panel"
+         top_pad="10"
+         width="313">
+     <accordion
+        follows="all"
+        height ="300"
+        layout="topleft"
+        left="0"
+        name="wearable_accordion"
+        single_expansion="true"
+        top="0"
+        width="313">
 		<accordion_tab
 			layout="topleft"
+            fit_panel="false"
 			min_height="150"
 			name="socks_main_tab"
 			title="Socks">
 			<scrolling_panel_list
 				follows="all"
+                layout="topleft"
 				left="0"
 				name="socks_main_param_list"
 				top="0"
 				width="303" />
 		</accordion_tab>
 	</accordion>
+    </panel>
 </panel>
 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml b/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml
index b214cd3de07..ed990eb0956 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml
@@ -1,57 +1,62 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
  <panel
+     background_visible="true"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
-	 left="10"
+	 left="0"
 	 name="edit_tattoo_panel"
 	 top_pad="10"
-	 width="313" >
+	 width="333" >
 	 <panel
-	  border="true"
-	  follows="left|top|right" 
-	  height="100" 
+	  border="false"
+      bg_alpha_color="DkGray2"
+      bg_opaque_color="DkGray2"
+      background_visible="true"
+      background_opaque="true"
+	  follows="top|left|right"
+	  height="400" 
 	  left="10" 
 	  layout="topleft" 
 	  name="avatar_tattoo_color_panel"
 	  top="0"
-	  width="293" >
+	  width="313" >
        <texture_picker
         can_apply_immediately="true"
         default_image_name="Default"
         follows="left|top"
-        height="80"
+        height="100"
         label="Head Tattoo"
         layout="topleft"
-        left="10"
+        left="30"
         name="Head Tattoo"
         tool_tip="Click to choose a picture"
         top="10"
-        width="64" />
+        width="94" />
        <texture_picker
         can_apply_immediately="true"
         default_image_name="Default"
         follows="left|top"
-        height="80"
+        height="100"
         label="Upper Tattoo"
         layout="topleft"
-        left_pad="10"
+        left_pad="30"
         name="Upper Tattoo"
         tool_tip="Click to choose a picture"
         top="10"
-        width="64" />
+        width="94" />
        <texture_picker
         can_apply_immediately="true"
         default_image_name="Default"
         follows="left|top"
-        height="80"
+        height="100"
         label="Lower Tattoo"
         layout="topleft"
-        left_pad="10"
+        left="30"
         name="Lower Tattoo"
         tool_tip="Click to choose a picture"
-        top="10"
-        width="64" />
+        top_pad="10"
+        width="94" />
 	 </panel>
 </panel>
 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_underpants.xml b/indra/newview/skins/default/xui/en/panel_edit_underpants.xml
index 03e0bb70ef9..d43497c943d 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_underpants.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_underpants.xml
@@ -1,21 +1,26 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
  <panel
+     background_visible="true"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
-	 left="10"
+	 left="0"
 	 name="edit_underpants_panel"
 	 top_pad="10"
-	 width="313" >
+	 width="333" >
    <panel
-      border="true"
-      follows="left|top|right" 
-      height="100" 
+      border="false"
+      bg_alpha_color="DkGray2"
+      bg_opaque_color="DkGray2"
+      background_visible="true"
+      background_opaque="true"
+      follows="top|left|right"
+      height="90" 
       left="10" 
       layout="topleft" 
       name="avatar_underpants_color_panel"
       top="0"
-      width="293" >
+      width="313" >
             <texture_picker
              can_apply_immediately="true"
              default_image_name="Default"
@@ -34,31 +39,49 @@
              height="80"
              label="Color/Tint"
              layout="topleft"
-             left_pad="10"
+             left_pad="20"
              name="Color/Tint"
              tool_tip="Click to open color picker"
              top="10"
              width="64" />
 	 </panel>
-	 <accordion
-		follows="left|top|right|bottom"
-		height ="340"
-		left="10"
-		name="wearable_accordion"
-		top_pad="10"
-		width="303">
+	 <panel
+         border="false"
+         bg_alpha_color="DkGray2"
+         bg_opaque_color="DkGray2"
+         background_visible="true"
+         background_opaque="true"
+         follows="all"
+         height="300"
+         layout="topleft"
+         left="10"
+         name="accordion_panel"
+         top_pad="10"
+         width="313">
+     <accordion
+        follows="all"
+        height ="300"
+        layout="topleft"
+        left="0"
+        name="wearable_accordion"
+        single_expansion="true"
+        top="0"
+        width="313">
 		<accordion_tab
 			layout="topleft"
+            fit_panel="false"
 			min_height="150"
 			name="underpants_main_tab"
 			title="Underpants">
 			<scrolling_panel_list
 				follows="all"
+                layout="topleft"
 				left="0"
 				name="underpants_main_param_list"
 				top="0"
 				width="303" />
 		</accordion_tab>
 	</accordion>
+    </panel>
 </panel>
 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml
index 20c56142fbb..45c6ef4526d 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml
@@ -1,21 +1,26 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
  <panel
+     background_visible="true"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
-	 left="10"
+	 left="0"
 	 name="edit_undershirt_panel"
 	 top_pad="10"
-	 width="313" >
+	 width="333" >
 	 <panel
-	  border="true"
-	  follows="left|top|right" 
-	  height="100" 
+	  border="false"
+      bg_alpha_color="DkGray2"
+      bg_opaque_color="DkGray2"
+      background_visible="true"
+      background_opaque="true"
+	  follows="top|left|right"
+	  height="90" 
 	  left="10" 
 	  layout="topleft" 
 	  name="avatar_undershirt_color_panel"
 	  top="0"
-	  width="293" >
+	  width="313" >
        <texture_picker
         can_apply_immediately="true"
         default_image_name="Default"
@@ -34,31 +39,49 @@
         height="80"
         label="Color/Tint"
         layout="topleft"
-        left_pad="10"
+        left_pad="20"
         name="Color/Tint"
         tool_tip="Click to open Color Picker"
         top="10"
         width="64" />
        </panel>
-	 <accordion
-		follows="left|top|right|bottom"
-		height ="340"
-		left="10"
-		name="wearable_accordion"
-		top_pad="10"
-		width="303">
+	 <panel
+         border="false"
+         bg_alpha_color="DkGray2"
+         bg_opaque_color="DkGray2"
+         background_visible="true"
+         background_opaque="true"
+         follows="all"
+         height="300"
+         layout="topleft"
+         left="10"
+         name="accordion_panel"
+         top_pad="10"
+         width="313">
+     <accordion
+        follows="all"
+        height ="300"
+        layout="topleft"
+        left="0"
+        name="wearable_accordion"
+        single_expansion="true"
+        top="0"
+        width="313">
 		<accordion_tab
 			layout="topleft"
+            fit_panel="false"
 			min_height="150"
 			name="undershirt_main_tab"
 			title="Undershirt">
 			<scrolling_panel_list
 				follows="all"
+                layout="topleft"
 				left="0"
 				name="undershirt_main_param_list"
 				top="0"
 				width="303" />
 		</accordion_tab>
 	</accordion>
+    </panel>
 </panel>
 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
index b4272bb10a2..dc2f085356d 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
@@ -155,7 +155,7 @@ left="0"
          bg_opaque_color="DkGray2"
          background_visible="true"
          background_opaque="true"
-         follows="top|left"
+         follows="top|left|right"
          height="60"
          label="Shirt"
          layout="topleft"
@@ -164,7 +164,7 @@ left="0"
 		 top_pad="10"
          width="313">
 		 <text
-		 follows="top|left"
+		 follows="top|left|right"
 		 height="16"
 		 layout="topleft"
 		 left="10"
-- 
GitLab