From 65f8d1822d058aee1902238e298f760368b724f6 Mon Sep 17 00:00:00 2001
From: Andrew Dyukov <adyukov@productengine.com>
Date: Fri, 4 Jun 2010 20:21:07 +0300
Subject: [PATCH] EXT-7511 FIXED Resolved problem with cropping of item
 selection bottom

Problem reproduced for items which had divider at the bottom. It was caused by non-optimal placement of divider
in item. To fix this, "top" attribute of divider was changed, and when done so it turned out that increase of items
height from implementation of this task was not necessary, so rolled back these changes in xml and code. Also added some padding between flatlists items to avoid cropping of top part of item selection because of divider.

Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/502/

--HG--
branch : product-engine
---
 indra/newview/llcofwearables.cpp              |  8 +-----
 .../xui/en/panel_body_parts_list_item.xml     | 16 ++++++------
 .../xui/en/panel_clothing_list_item.xml       | 26 +++++++++----------
 .../default/xui/en/panel_cof_wearables.xml    |  3 +++
 .../en/panel_deletable_wearable_list_item.xml |  8 +++---
 .../xui/en/panel_dummy_clothing_list_item.xml |  8 +++---
 6 files changed, 33 insertions(+), 36 deletions(-)

diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index 05046aca5a7..916d53da3c7 100644
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -387,13 +387,7 @@ LLPanelClothingListItem* LLCOFWearables::buildClothingListItem(LLViewerInventory
 	item_panel->childSetAction("btn_edit", mCOFCallbacks.mEditWearable);
 	
 	//turning on gray separator line for the last item in the items group of the same wearable type
-	if (last)
-	{
-		LLRect rect = item_panel->getRect();
-		item_panel->reshape(rect.getWidth(), rect.getHeight() +
-		item_panel->getChild<LLView>("wearable_type_separator_icon")->getRect().getHeight());
-		item_panel->childSetVisible("wearable_type_separator_icon", true);
-	}
+	item_panel->childSetVisible("wearable_type_separator_icon", last);
 
 	return item_panel;
 }
diff --git a/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml b/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml
index a0bbc8f2ee3..4e5f594ffec 100644
--- a/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <panel
  follows="top|right|left"
- height="25"
+ height="23"
  layout="topleft"
  left="0"
  name="wearable_item"
@@ -45,7 +45,7 @@
      use_ellipses="true"
      name="item_name"
      text_color="white"
-     top="4"
+     top="5"
      value="..."
      width="359" />
     <panel
@@ -74,10 +74,10 @@
      name="btn_edit_panel"
      layout="topleft"
      follows="top|right"
-     top="0"
+     top="1"
      left_pad="3"
-     height="24"
-     width="27"
+     height="23"
+     width="26"
      tab_stop="false">
          <button 
           name="btn_edit"
@@ -86,8 +86,8 @@
           image_overlay="Edit_Wrench"
           top="0"
           left="0"
-          height="24"
-          width="24"
+          height="23"
+          width="23"
           tab_stop="false" />
       </panel>
     <icon
@@ -97,7 +97,7 @@
      layout="bottomleft"
      left="0"
      name="wearable_type_separator_icon"
-     top="3"
+     top="0"
      visible="true"
      width="380"/>
 </panel>
diff --git a/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml b/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml
index e41141f6bd0..5d81aebbd51 100644
--- a/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml
@@ -33,7 +33,7 @@
      follows="top|left"
      image_unselected="Toast_CloseBtn"
      image_selected="Toast_CloseBtn"
-     top="2"
+     top="3"
      left="0"
      height="18"
      width="18"
@@ -56,7 +56,7 @@
      use_ellipses="true"
      name="item_name"
      text_color="white"
-     top="4"
+     top="5"
      value="..."
      width="359" />
     <button 
@@ -64,20 +64,20 @@
      layout="topleft"
      follows="top|right"
      image_overlay="UpArrow_Off"
-     top="0"
+     top="1"
      left="0"
-     height="24"
-     width="24"
+     height="23"
+     width="23"
      tab_stop="false" />
     <button 
      name="btn_move_down"
      layout="topleft"
      follows="top|right"
      image_overlay="DownArrow_Off"
-     top="0"
+     top="1"
      left_pad="3"
-     height="24"
-     width="24"
+     height="23"
+     width="23"
      tab_stop="false" />
     <panel
      background_visible="false"
@@ -107,18 +107,18 @@
      follows="top|right"
      top="0"
      left_pad="3"
-     height="24"
-     width="27"
+     height="23"
+     width="26"
      tab_stop="false">
         <button 
          name="btn_edit"
          layout="topleft"
          follows="top|right"
          image_overlay="Edit_Wrench"
-         top="0"
+         top="1"
          left="0"
-         height="24"
-         width="24"
+         height="23"
+         width="23"
          tab_stop="false" />
       </panel>
     <icon
diff --git a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml
index 83040a745bb..d36c2a4e6fe 100644
--- a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml
+++ b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml
@@ -28,6 +28,7 @@
              allow_select="true"
              follows="all"
              height="10"
+             item_pad="2"
              layout="topleft"
              left="0"
              multi_select="true"
@@ -43,6 +44,7 @@
              allow_select="true"
              follows="all"
              height="10"
+             item_pad="2"
              layout="topleft"
              left="0"
              multi_select="true"
@@ -58,6 +60,7 @@
              allow_select="true"
              follows="all"
              height="10"
+             item_pad="2"
              layout="topleft"
              left="0"
              multi_select="true"
diff --git a/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml b/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml
index b006d125eef..45031859f1d 100644
--- a/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <panel
  follows="top|right|left"
- height="25"
+ height="23"
  layout="topleft"
  left="0"
  name="deletable_wearable_item"
@@ -33,7 +33,7 @@
      follows="top|left"
      image_unselected="Toast_CloseBtn"
      image_selected="Toast_CloseBtn"
-     top="2"
+     top="3"
      left="0"
      height="18"
      width="18"
@@ -56,7 +56,7 @@
      use_ellipses="true"
      name="item_name"
      text_color="white"
-     top="4"
+     top="5"
      value="..."
      width="359" />
     <icon
@@ -66,7 +66,7 @@
      layout="bottomleft"
      left="0"
      name="wearable_type_separator_icon"
-     top="3"
+     top="0"
      visible="true"
      width="380"/>
 </panel>
diff --git a/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml b/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml
index 6c43635d499..20652df9186 100644
--- a/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <panel
  follows="top|right|left"
- height="25"
+ height="23"
  layout="topleft"
  left="0"
  name="dummy_clothing_item"
@@ -56,8 +56,8 @@
      image_overlay="AddItem_Off"
      top="0"
      left="0"
-     height="24"
-     width="24"
+     height="23"
+     width="23"
      tab_stop="false" />
     <icon
      follows="left|right|top"
@@ -66,7 +66,7 @@
      layout="bottomleft"
      left="0"
      name="wearable_type_separator_icon"
-     top="3"
+     top="0"
      visible="true"
      width="380"/>
 </panel>
-- 
GitLab