summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Zaporozhan <dzaporozhan@productengine.com>2010-04-01 17:41:47 +0300
committerDmitry Zaporozhan <dzaporozhan@productengine.com>2010-04-01 17:41:47 +0300
commit3c036ef49b1e8690f5efe29393a4990e117e5bfe (patch)
treed76246460f354c476027250aa6243d116241c574
parent7b0dab508363e5da1ab180bdd0f8d63f1985105c (diff)
(work in progress) EXT-6564(major) - Fix wearable editing panels
Fixed Edit Shape panel layout: - fixed widget positioning according to spec - added gear button bar - fixed accordion positioning - fixed parameter list positioning TODO: - fix parameter panel positioning - apply changes to the rest of wearable panels Reviewed by Vadim Savchuk - https://codereview.productengine.com/secondlife/r/149/ --HG-- branch : product-engine
-rw-r--r--indra/llui/llscrollingpanellist.cpp28
-rw-r--r--indra/llui/llscrollingpanellist.h6
-rw-r--r--indra/newview/llpaneleditwearable.cpp6
-rw-r--r--indra/newview/llsidepanelappearance.cpp2
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_shape.xml86
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_wearable.xml64
-rw-r--r--indra/newview/skins/default/xui/en/panel_scrolling_param.xml32
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_appearance.xml2
8 files changed, 185 insertions, 41 deletions
diff --git a/indra/llui/llscrollingpanellist.cpp b/indra/llui/llscrollingpanellist.cpp
index 4f55c0507c..b7840d1b59 100644
--- a/indra/llui/llscrollingpanellist.cpp
+++ b/indra/llui/llscrollingpanellist.cpp
@@ -47,7 +47,12 @@ void LLScrollingPanelList::clearPanels()
{
deleteAllChildren();
mPanelList.clear();
- reshape( 1, 1, FALSE );
+
+ LLRect rc = getRect();
+ rc.setLeftTopAndSize(rc.mLeft, rc.mTop, 1, 1);
+ setRect(rc);
+
+ notifySizeChanged(rc.getHeight());
}
S32 LLScrollingPanelList::addPanel( LLScrollingPanel* panel )
@@ -67,7 +72,11 @@ S32 LLScrollingPanelList::addPanel( LLScrollingPanel* panel )
max_width = llmax( max_width, childp->getRect().getWidth() );
cur_gap = GAP_BETWEEN_PANELS;
}
- reshape( max_width, total_height, FALSE );
+ LLRect rc = getRect();
+ rc.setLeftTopAndSize(rc.mLeft, rc.mTop, max_width, total_height);
+ setRect(rc);
+
+ notifySizeChanged(rc.getHeight());
// Reposition each of the child views
S32 cur_y = total_height;
@@ -131,7 +140,11 @@ void LLScrollingPanelList::removePanel( U32 panel_index )
max_width = llmax( max_width, childp->getRect().getWidth() );
cur_gap = GAP_BETWEEN_PANELS;
}
- reshape( max_width, total_height, FALSE );
+ LLRect rc = getRect();
+ rc.setLeftTopAndSize(rc.mLeft, rc.mTop, max_width, total_height);
+ setRect(rc);
+
+ notifySizeChanged(rc.getHeight());
// Reposition each of the child views
S32 cur_y = total_height;
@@ -200,3 +213,12 @@ void LLScrollingPanelList::draw()
LLUICtrl::draw();
}
+void LLScrollingPanelList::notifySizeChanged(S32 height)
+{
+ LLSD info;
+ info["action"] = "size_changes";
+ info["height"] = height;
+ notifyParent(info);
+}
+
+// EOF
diff --git a/indra/llui/llscrollingpanellist.h b/indra/llui/llscrollingpanellist.h
index 3abfbcbbe7..5f1996159b 100644
--- a/indra/llui/llscrollingpanellist.h
+++ b/indra/llui/llscrollingpanellist.h
@@ -61,7 +61,6 @@ public:
Params()
{
name = "scrolling_panel_list";
- follows.flags = FOLLOWS_LEFT | FOLLOWS_BOTTOM;
}
};
LLScrollingPanelList(const Params& p)
@@ -86,6 +85,11 @@ public:
private:
void updatePanelVisiblilty();
+ /**
+ * Notify parent about size change, makes sense when used inside accordion
+ */
+ void notifySizeChanged(S32 height);
+
panel_list_t mPanelList;
};
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index 805016f089..c0528da999 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -489,7 +489,6 @@ void LLPanelEditWearable::initializePanel()
updateScrollingPanelUI();
}
-
}
void LLPanelEditWearable::updateScrollingPanelUI()
@@ -640,14 +639,9 @@ void LLPanelEditWearable::buildParamList(LLScrollingPanelList *panel_list, value
{
LLPanel::Params p;
p.name("LLScrollingPanelParam");
- p.rect(LLRect(0, LLScrollingPanelParam::PARAM_PANEL_HEIGHT, LLScrollingPanelParam::PARAM_PANEL_WIDTH, 0 ));
LLScrollingPanelParam* panel_param = new LLScrollingPanelParam( p, NULL, (*it).second, TRUE, this->getWearable());
height = panel_list->addPanel( panel_param );
}
-
- S32 width = tab->getRect().getWidth();
-
- tab->reshape(width,height + tab->getHeaderHeight()+10,FALSE);
}
}
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index b951434010..a80687da4d 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -297,6 +297,8 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *we
return;
}
+ mCurrOutfitPanel->setVisible(!visible);
+
mEditWearable->setVisible(visible);
mEditWearable->setWearable(wearable);
mFilterEditor->setVisible(!visible);
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 45c4b92338..9a3b5c26ec 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_shape.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_shape.xml
@@ -1,38 +1,43 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
+ background_visible="true"
follows="all"
height="400"
layout="topleft"
left="10"
name="edit_shape_panel"
top_pad="10"
- width="313" >
+ width="333" >
<panel
- border="true"
+ border="false"
+ bg_alpha_color="DkGray2"
+ bg_opaque_color="DkGray2"
+ background_visible="true"
+ background_opaque="true"
follows="top|left"
height="50"
left="10"
layout="topleft"
name="avatar_sex_panel"
- top="10"
- width="293" >
+ top="0"
+ width="313" >
<text
follows="top|left"
height="16"
layout="topleft"
left="10"
name="gender_text"
- width="303">
+ width="313">
Gender:
</text>
<radio_group
- follows="all"
+ follows="left|top|right"
left="10"
- height="34"
+ height="28"
layout="topleft"
name="sex_radio"
top_pad="3"
- width="200" >
+ width="303" >
<radio_item
follows="all"
height="16"
@@ -51,21 +56,41 @@
width="82" />
</radio_group>
</panel>
+ <panel
+ border="false"
+ bg_alpha_color="DkGray2"
+ bg_opaque_color="DkGray2"
+ background_visible="true"
+ background_opaque="true"
+ follows="all"
+ height="345"
+ label="Shirt"
+ layout="topleft"
+ left="10"
+ name="accordion_panel"
+ top_pad="10"
+ width="313">
<accordion
- follows="left|top|right|bottom"
- height ="330"
- left="10"
+ layout="topleft"
+ follows="all"
+ height ="345"
+ left="0"
name="wearable_accordion"
- top_pad="10"
- width="303">
+ top="0"
+ single_expansion="true"
+ fit_parent="false"
+ width="313">
<accordion_tab
layout="topleft"
min_height="150"
name="shape_body_tab"
+ fit_panel="false"
title="Body">
<scrolling_panel_list
+ layout="topleft"
follows="all"
left="0"
+ height="300"
name="shape_body_param_list"
top="0"
width="303" />
@@ -73,11 +98,13 @@
<accordion_tab
layout="topleft"
min_height="150"
+ fit_panel="false"
name="shape_head_tab"
title="Head">
- <scrolling_panel_list
+ <scrolling_panel_list
+ layout="topleft"
follows="all"
- left="0"
+ left="10"
name="shape_head_param_list"
top="0"
width="303" />
@@ -85,9 +112,11 @@
<accordion_tab
layout="topleft"
min_height="150"
+ fit_panel="false"
name="shape_eyes_tab"
title="Eyes">
- <scrolling_panel_list
+ <scrolling_panel_list
+ layout="topleft"
follows="all"
left="0"
name="shape_eyes_param_list"
@@ -97,9 +126,11 @@
<accordion_tab
layout="topleft"
min_height="150"
+ fit_panel="false"
name="shape_ears_tab"
title="Ears">
- <scrolling_panel_list
+ <scrolling_panel_list
+ layout="topleft"
follows="all"
left="0"
name="shape_ears_param_list"
@@ -110,8 +141,10 @@
layout="topleft"
min_height="150"
name="shape_nose_tab"
+ fit_panel="false"
title="Nose">
- <scrolling_panel_list
+ <scrolling_panel_list
+ layout="topleft"
follows="all"
left="0"
name="shape_nose_param_list"
@@ -122,8 +155,10 @@
layout="topleft"
min_height="150"
name="shape_mouth_tab"
+ fit_panel="false"
title="Mouth">
- <scrolling_panel_list
+ <scrolling_panel_list
+ layout="topleft"
follows="all"
left="0"
name="shape_mouth_param_list"
@@ -134,8 +169,10 @@
layout="topleft"
min_height="150"
name="shape_chin_tab"
+ fit_panel="false"
title="Chin">
- <scrolling_panel_list
+ <scrolling_panel_list
+ layout="topleft"
follows="all"
left="0"
name="shape_chin_param_list"
@@ -146,8 +183,10 @@
layout="topleft"
min_height="150"
name="shape_torso_tab"
+ fit_panel="false"
title="Torso">
- <scrolling_panel_list
+ <scrolling_panel_list
+ layout="topleft"
follows="all"
left="0"
name="shape_torso_param_list"
@@ -158,8 +197,10 @@
layout="topleft"
min_height="150"
name="shape_legs_tab"
+ fit_panel="false"
title="Legs">
- <scrolling_panel_list
+ <scrolling_panel_list
+ layout="topleft"
follows="all"
left="0"
name="shape_legs_param_list"
@@ -167,5 +208,6 @@
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 f76a56bda4..b4272bb10a 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
@@ -150,7 +150,11 @@ left="0"
value="Editing Shape"
width="270" />
<panel
- border="true"
+ border="false"
+ bg_alpha_color="DkGray2"
+ bg_opaque_color="DkGray2"
+ background_visible="true"
+ background_opaque="true"
follows="top|left"
height="60"
label="Shirt"
@@ -335,30 +339,76 @@ left="0"
visible="false"
width="333" />
</panel>
+ <panel
+ follows="left|right|bottom"
+ height="38"
+ label="gear_buttom_panel"
+ layout="bottom|left|right"
+ left="0"
+ bottom="25"
+ name="gear_buttom_panel"
+ width="333">
+ <button
+ follows="bottom|left"
+ tool_tip="Options"
+ height="18"
+ image_disabled="OptionsMenu_Disabled"
+ image_selected="OptionsMenu_Press"
+ image_unselected="OptionsMenu_Off"
+ layout="topleft"
+ left="10"
+ name="friends_viewsort_btn"
+ top="10"
+ width="18" />
+ <button
+ follows="bottom|left"
+ height="18"
+ image_selected="AddItem_Press"
+ image_unselected="AddItem_Off"
+ image_disabled="AddItem_Disabled"
+ layout="topleft"
+ left_pad="10"
+ name="add_btn"
+ tool_tip="TODO"
+ width="18" />
+ <button
+ follows="bottom|left"
+ height="18"
+ image_selected="TrashItem_Press"
+ image_unselected="TrashItem_Off"
+ image_disabled="TrashItem_Disabled"
+ layout="topleft"
+ left_pad="10"
+ right="-10"
+ name="del_btn"
+ tool_tip="TODO"
+ top_delta="0"
+ width="18" />
+ </panel>
<panel
- follows="all"
+ follows="bottom|left|right"
height="25"
layout="bottom|left|right"
left="0"
name="button_panel"
- top_pad="10"
+ bottom="5"
width="333" >
<button
follows="bottomleft"
layout="topleft"
height="23"
label="Save As"
- left="10"
+ left="8"
name="save_as_button"
top="0"
- width="100" />
+ width="153" />
<button
follows="bottomleft"
layout="topleft"
height="23"
label="Revert"
- left_pad="10"
+ left_pad="7"
name="revert_button"
- width="100" />
+ width="153" />
</panel>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml
index 44afadf65a..f9c86fc75b 100644
--- a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml
+++ b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml
@@ -5,7 +5,7 @@
left="0"
name="LLScrollingPanelParam"
top="152"
- width="270">
+ width="290">
<text
follows="left|top"
height="16"
@@ -46,6 +46,36 @@
width="128">
Loading...
</text>
+ <view_border
+ layout="topleft"
+ follows="left|top"
+ left="2"
+ top="0"
+ width="132"
+ height="132"
+ thickness="2"
+ shadow_light_color="LtGray_50"
+ highlight_light_color="LtGray_50"
+ highlight_dark_color="LtGray_50"
+ shadow_dark_color="LtGray_50"
+ bevel_style="in"
+ name="left_border"
+ />
+ <view_border
+ layout="topleft"
+ follows="left|top"
+ left_pad="2"
+ top_delta="0"
+ width="132"
+ height="132"
+ thickness="2"
+ shadow_light_color="LtGray_50"
+ highlight_light_color="LtGray_50"
+ highlight_dark_color="LtGray_50"
+ shadow_dark_color="LtGray_50"
+ bevel_style="in"
+ name="right_border"
+ />
<button
enabled="false"
height="132"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
index 20a1de59fc..c5efa2e221 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
@@ -120,6 +120,6 @@ width="333">
layout="topleft"
left="0"
name="panel_edit_wearable"
- top="35"
+ top="0"
visible="false" />
</panel>