diff options
author | Igor Borovkov <iborovkov@productengine.com> | 2010-06-01 17:24:35 +0300 |
---|---|---|
committer | Igor Borovkov <iborovkov@productengine.com> | 2010-06-01 17:24:35 +0300 |
commit | a543a1276e31ee165cbec8c3ed04961b2423ccac (patch) | |
tree | 5c96d55336e1a77ec5c6fb7f73d08af1317753a7 /indra/newview | |
parent | 1e090dafa6271ec2acb92441bcbbbbe058124be0 (diff) |
EXT-7527 FIXED repositioned "Add more..." button (panel edit outfit)
- relocated Add button (required substantial layout_stacks repositioning)
- got rid of switch/shop buttons
- reverted addition of adaptors for (accordion tabs/list view) inline button bars
* failed to get rid of an empty space above bottom bars when "add wearables panel" is invisible
(due to bug in the layout stack, when border is still drawn below layout panel which is only one visible)
https://jira.secondlife.com/secure/attachment/39854/empty+space+.jpg
Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/481/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llcofwearables.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llcofwearables.h | 47 | ||||
-rw-r--r-- | indra/newview/llpaneloutfitedit.cpp | 35 | ||||
-rw-r--r-- | indra/newview/llpaneloutfitedit.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_cof_wearables.xml | 66 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_outfit_edit.xml | 357 |
6 files changed, 225 insertions, 284 deletions
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index ee366f4e3c..6acd16326a 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -46,8 +46,6 @@ #include "llpaneloutfitedit.h" #include "llsidetray.h" -static LLRegisterPanelClassWrapper<LLCOFAccordionListAdaptor> t_cof_accodion_list_adaptor("accordion_list_adaptor"); - static LLRegisterPanelClassWrapper<LLCOFWearables> t_cof_wearables("cof_wearables"); const LLSD REARRANGE = LLSD().with("rearrange", LLSD()); diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h index 8f8bda2be8..f99f2662e6 100644 --- a/indra/newview/llcofwearables.h +++ b/indra/newview/llcofwearables.h @@ -45,53 +45,6 @@ class LLPanelClothingListItem; class LLPanelBodyPartsListItem; class LLPanelDeletableWearableListItem; -/** - * Adaptor between LLAccordionCtrlTab and LLFlatListView to facilitate communication between them - * (notify, notifyParent) regarding size changes of a list and selection changes across accordion tabs. - * Besides that it acts as a container for the LLFlatListView and a button bar on top of it. - */ -class LLCOFAccordionListAdaptor : public LLPanel -{ -public: - LLCOFAccordionListAdaptor() : LLPanel() {}; - ~LLCOFAccordionListAdaptor() {}; - - S32 notifyParent(const LLSD& info) - { - LLView* parent = getParent(); - if (!parent) return -1; - - if (!(info.has("action") && "size_changes" == info["action"].asString())) - { - return parent->notifyParent(info); - } - - LLRect rc; - childGetRect("button_bar", rc); - - LLSD params; - params["action"] = "size_changes"; - params["width"] = info["width"]; - params["height"] = info["height"].asInteger() + rc.getHeight(); - - return parent->notifyParent(params); - } - - - S32 notify(const LLSD& info) - { - for (child_list_const_iter_t iter = beginChild(); iter != endChild(); iter++) - { - if (dynamic_cast<LLFlatListView*>(*iter)) - { - return (*iter)->notify(info); - } - } - return LLPanel::notify(info); - }; -}; - - class LLCOFWearables : public LLPanel { public: diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 78de384cdc..85b4259a29 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -259,7 +259,6 @@ BOOL LLPanelOutfitEdit::postBuild() mFolderViewBtn = getChild<LLButton>("folder_view_btn"); mListViewBtn = getChild<LLButton>("list_view_btn"); - mAddToOutfitBtn = getChild<LLButton>("add_to_outfit_btn"); childSetCommitCallback("filter_button", boost::bind(&LLPanelOutfitEdit::showWearablesFilter, this), NULL); childSetCommitCallback("folder_view_btn", boost::bind(&LLPanelOutfitEdit::showFilteredFolderWearablesPanel, this), NULL); @@ -275,8 +274,6 @@ BOOL LLPanelOutfitEdit::postBuild() mCOFWearables->getCOFCallbacks().mMoveWearableCloser = boost::bind(&LLPanelOutfitEdit::moveWearable, this, true); mCOFWearables->getCOFCallbacks().mMoveWearableFurther = boost::bind(&LLPanelOutfitEdit::moveWearable, this, false); - mCOFWearables->childSetAction("add_btn", boost::bind(&LLPanelOutfitEdit::toggleAddWearablesPanel, this)); - mAddWearablesPanel = getChild<LLPanel>("add_wearables_panel"); mInventoryItemsPanel = getChild<LLInventoryPanel>("inventory_items"); @@ -298,7 +295,8 @@ BOOL LLPanelOutfitEdit::postBuild() mSearchFilter = getChild<LLFilterEditor>("look_item_filter"); mSearchFilter->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onSearchEdit, this, _2)); - + + childSetAction("show_add_wearables_btn", boost::bind(&LLPanelOutfitEdit::toggleAddWearablesPanel, this)); childSetAction("add_to_outfit_btn", boost::bind(&LLPanelOutfitEdit::onAddToOutfitClicked, this)); mEditWearableBtn = getChild<LLButton>("edit_wearable_btn"); @@ -341,15 +339,28 @@ void LLPanelOutfitEdit::moveWearable(bool closer_to_body) void LLPanelOutfitEdit::toggleAddWearablesPanel() { BOOL current_visibility = mAddWearablesPanel->getVisible(); - mAddWearablesPanel->setVisible(!current_visibility); + showAddWearablesPanel(!current_visibility); +} + +void LLPanelOutfitEdit::showAddWearablesPanel(bool show_add_wearables) +{ + mAddWearablesPanel->setVisible(show_add_wearables); + + childSetValue("show_add_wearables_btn", show_add_wearables); + + childSetVisible("filter_wearables_combobox", show_add_wearables); + childSetVisible("filter_button", show_add_wearables); - mFolderViewBtn->setVisible(!current_visibility); - mListViewBtn->setVisible(!current_visibility); - mAddToOutfitBtn->setVisible(!current_visibility); + //search filter should be disabled + if (!show_add_wearables) + { + childSetValue("filter_button", false); + showWearablesFilter(); + } - // Change right dummy icon to fill the toggled buttons space. - childSetVisible("add_wearables_dummy_icon", !current_visibility); - childSetVisible("dummy_right_icon", current_visibility); + //switching button bars + childSetVisible("no_add_wearables_button_bar", !show_add_wearables); + childSetVisible("add_wearables_button_bar", show_add_wearables); } void LLPanelOutfitEdit::showWearablesFilter() @@ -735,7 +746,7 @@ void LLPanelOutfitEdit::showFilteredWearableItemsList(LLWearableType::EType type { mWearableListTypeCollector->setType(type); mWearableListManager->setFilterCollector(mWearableListTypeCollector); - mAddWearablesPanel->setVisible(TRUE); + showAddWearablesPanel(true); showFilteredWearablesPanel(); } diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h index 1569c55732..6ce581f5f7 100644 --- a/indra/newview/llpaneloutfitedit.h +++ b/indra/newview/llpaneloutfitedit.h @@ -93,6 +93,7 @@ public: void moveWearable(bool closer_to_body); void toggleAddWearablesPanel(); + void showAddWearablesPanel(bool show__add_wearables); void showWearablesFilter(); void showFilteredWearablesPanel(); void showFilteredFolderWearablesPanel(); @@ -144,7 +145,6 @@ private: LLButton* mEditWearableBtn; LLButton* mFolderViewBtn; LLButton* mListViewBtn; - LLButton* mAddToOutfitBtn; LLPanel* mAddWearablesPanel; LLFindNonLinksByMask* mWearableListMaskCollector; 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 cf84c31078..68c364680e 100644 --- a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml +++ b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml @@ -38,73 +38,31 @@ layout="topleft" name="tab_clothing" title="Clothing"> - - <!-- *NOTE there should be no any gaps between the button bar and the list - - accordiong-list adaptor won't employ them while calculating new height when the size of the list changes --> - <panel - background_visible="false" - class="accordion_list_adaptor" + <flat_list_view + allow_select="true" follows="all" - height="45" + height="10" layout="topleft" left="0" - name="button_bar_adaptor" + multi_select="true" + name="list_clothing" top="0" - width="311"> - <panel - bevel="none" - filename="panel_clothing_list_button_bar.xml" - height="35" - name="button_bar" - top="0" - width="311" /> - <flat_list_view - allow_select="true" - follows="all" - height="10" - layout="topleft" - left="0" - multi_select="true" - name="list_clothing" - top_pad="0" - width="311" /> - </panel> + width="311" /> </accordion_tab> <accordion_tab layout="topleft" name="tab_body_parts" title="Body Parts"> - - <!-- *NOTE there should be no any gaps between the button bar and the list - - accordiong-list adaptor won't employ them while calculating new height when the size of the list changes --> - <panel - background_visible="false" - class="accordion_list_adaptor" + <flat_list_view + allow_select="true" follows="all" - height="45" + height="10" layout="topleft" left="0" - name="button_bar_adaptor" + multi_select="true" + name="list_body_parts" top="0" - width="311"> - <panel - bevel="none" - filename="panel_bodyparts_list_button_bar.xml" - height="35" - name="button_bar" - top="0" - width="311"/> - <flat_list_view - allow_select="true" - follows="all" - height="10" - layout="topleft" - left="0" - multi_select="true" - name="list_body_parts" - top_pad="0" - width="311" /> - </panel> + width="311" /> </accordion_tab> </accordion> </panel> 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 93b5bb54e6..b2a399efe6 100644 --- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml @@ -52,20 +52,7 @@ <string name="Filter.Clothes/Body" value="Clothes/Body"/> <string name="Filter.Objects" value="Objects"/> - <!-- - TODO remove this button. Added it temporary for QA to be able to test new edit wearable - panel (see EXT-6564) - --> - <button - follows="left|top|right" - height="20" - label="edit" - left="0" - top="0" - layout="topleft" - name="edit_wearable_btn" - width="40" /> - + <button follows="top|left" height="23" @@ -160,7 +147,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap clip="false" default_tab_group="2" follows="all" - height="468" + height="465" width="313" layout="topleft" orientation="vertical" @@ -170,7 +157,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap left="5"> <layout_panel layout="topleft" - height="193" + height="187" label="IM Control Panel" min_height="100" name="outfit_wearables_panel" @@ -178,96 +165,89 @@ It is calculated as border_size + 2*UIResizeBarOverlap auto_resize="true" user_resize="true"> - <!-- List containing items from the COF and Base outfit --> - <panel - background_visible="false" - class="cof_wearables" - filename="panel_cof_wearables.xml" - follows="left|top|right|bottom" - height="193" - layout="topleft" - left="1" - name="cof_wearables_list" - top="0" - width="311" /> - </layout_panel> - - - <layout_panel - background_visible="true" - bg_alpha_color="DkGray2" - auto_resize="true" - default_tab_group="3" - height="184" - min_height="210" - name="add_wearables_panel" - width="313" - tab_group="2" - user_resize="true" - visible="false"> - <!-- this icon represent dragbar between layout panels. - This is a workaround implemented in EXT-7255 becouse of an issue with layout stack (EXT-7471) --> - <icon - follows="left|top|right" - height="10" - image_name="Dragbar" - left="0" - top_pad="-9" - width="313" /> - <text - follows="top|left|right" - font="SansSerifBold" - height="13" - layout="topleft" - left="5" - name="add_to_outfit_label" - text_color="LtGray" - top="4" - value="Add to Outfit:" - use_ellipses="true" - width="150" /> - <button - follows="top|right" - height="20" - image_overlay="Search_Icon" - is_toggle="true" - layout="topleft" - left_pad="5" - name="filter_button" - top_delta="0" - width="20" /> - <combo_box - follows="top|left|right" - height="20" - layout="topleft" - right="-5" - name="filter_wearables_combobox" - top_delta="0" - width="110"/> - <layout_stack animate="true" + border_size="0" follows="all" - height="155" + height="185" width="313" layout="topleft" name="filter_panels" - top_pad="5" + top="0" left="0"> <layout_panel - auto_resize="false" + auto_resize="true" + background_visible="true" + bg_alpha_color="DkGray2" layout="topleft" - follows="left|top|right" + height="154" + label="add_button_and_combobox" + name="add_button_and_combobox" + width="311" + user_resize="false" + visible="true"> + + <!-- List containing items from the COF and Base outfit --> + <panel + background_visible="false" + class="cof_wearables" + filename="panel_cof_wearables.xml" + follows="all" + height="129" + layout="topleft" + left="1" + name="cof_wearables_list" + top="0" + width="311" /> + + <button + follows="left|bottom" + height="22" + is_toggle="true" + label="Add More..." + layout="topleft" + left="2" + name="show_add_wearables_btn" + top_pad="2" + width="125" /> + + <combo_box + follows="left|right|bottom" + height="22" + layout="topleft" + left_pad="5" + name="filter_wearables_combobox" + top_delta="0" + visible="false" + width="152"/> + + <button + follows="bottom|right" + height="22" + image_overlay="Search_Icon" + is_toggle="true" + layout="topleft" + name="filter_button" + right="-5" + top_delta="0" + visible="false" + width="20" /> + </layout_panel> + + <layout_panel + auto_resize="false" + background_visible="true" + bg_alpha_color="DkGray2" height="30" - label="IM Control Panel" name="filter_panel" width="311" - user_resize="false" - visible="false"> + visible="false" + user_resize="false"> + <filter_editor background_image="TextField_Search_Off" enabled="true" - follows="left|top|right" + follows="left|right|top" font="SansSerif" label="Filter" layout="topleft" @@ -278,60 +258,114 @@ It is calculated as border_size + 2*UIResizeBarOverlap text_color="black" text_pad_left="25" visible="true"/> - </layout_panel> - <layout_panel - auto_resize="true" - background_visible="true" - bg_alpha_color="0.107 0.107 0.107 1" - height="145" - min_width="130" - name="inventory_panel" - width="311" - user_resize="true"> - <inventory_panel - allow_multi_select="true" - background_visible="false" - border="false" - follows="left|top|right|bottom" - height="140" - layout="topleft" - left="0" - mouse_opaque="false" - name="inventory_items" - top_pad="5" - width="310" - visible="false"/> - <panel - name="filtered_wearables_panel" - background_opaque="true" - background_visible="false" - layout="topleft" - follows="left|top|right|bottom" - border="false" - height="140" - left="0" - mouse_opaque="false" - width="311" - top_delta="0" - visible="true"> - <wearable_items_list - color="0.107 0.107 0.107 1" - name="filtered_wearables_list" - allow_select="true" - layout="topleft" - follows="all" - multi_select="true" - width="310" - height="140" - left="0" - top="0"/> - </panel> + </layout_panel> </layout_stack> - </layout_panel> + </layout_panel> + + + <layout_panel + background_visible="true" + bg_alpha_color="DkGray2" + auto_resize="true" + default_tab_group="3" + height="211" + min_height="210" + name="add_wearables_panel" + width="313" + tab_group="2" + user_resize="true" + visible="false"> + + <!-- this icon represent dragbar between layout panels. + This is a workaround implemented in EXT-7255 becouse of an issue with layout stack (EXT-7471) --> + <icon + follows="left|top|right" + height="10" + image_name="Dragbar" + left="0" + top_pad="-9" + width="313" /> + + <inventory_panel + allow_multi_select="true" + background_visible="false" + border="false" + follows="left|top|right|bottom" + height="210" + layout="topleft" + left="0" + mouse_opaque="false" + name="inventory_items" + top_pad="5" + width="310" + visible="false"/> + <panel + name="filtered_wearables_panel" + background_opaque="true" + background_visible="false" + layout="topleft" + follows="left|top|right|bottom" + border="false" + height="210" + left="0" + mouse_opaque="false" + width="311" + top_delta="0" + visible="true"> + <wearable_items_list + color="0.107 0.107 0.107 1" + name="filtered_wearables_list" + allow_select="true" + layout="topleft" + follows="all" + multi_select="true" + width="310" + height="210" + left="0" + top="0"/> + </panel> + + </layout_panel> </layout_stack> - <!-- Button bar --> + + <!-- BUTTON BAR --> + <panel + background_visible="true" + bevel_style="none" + follows="bottom|left|right" + height="27" + label="bottom_panel" + layout="topleft" + left="5" + name="no_add_wearables_button_bar" + top_pad="0" + width="313"> + <button + follows="bottom|left" + height="25" + image_hover_unselected="Toolbar_Left_Over" + image_overlay="OptionsMenu_Off" + image_selected="Toolbar_Left_Selected" + image_unselected="Toolbar_Left_Off" + layout="topleft" + left="0" + name="gear_menu_btn" + top="1" + width="31" /> + <icon + follows="bottom|left|right" + height="25" + image_name="Toolbar_Right_Off" + layout="topleft" + left_pad="1" + name="dummy_right_icon" + width="281" /> + </panel> + + + <!-- BUTTON BAR - WEARABLES ADDING MODE --> <panel background_visible="true" bevel_style="none" @@ -339,9 +373,10 @@ It is calculated as border_size + 2*UIResizeBarOverlap height="27" label="add_wearables_button_bar" layout="topleft" - left="4" + left="5" name="add_wearables_button_bar" - top_pad="0" + top_delta="0" + visible="false" width="313"> <button follows="bottom|left" @@ -367,7 +402,6 @@ It is calculated as border_size + 2*UIResizeBarOverlap left_pad="1" name="folder_view_btn" top="1" - visible="false" width="31" /> <button follows="bottom|left" @@ -381,7 +415,6 @@ It is calculated as border_size + 2*UIResizeBarOverlap left_pad="1" name="list_view_btn" top="1" - visible="false" width="31" /> <button follows="bottom|left" @@ -395,31 +428,19 @@ It is calculated as border_size + 2*UIResizeBarOverlap left_pad="1" name="add_to_outfit_btn" top="1" - visible="false" width="31" /> - <icon - follows="bottom|left|right" - height="25" - image_name="Toolbar_Right_Off" - layout="topleft" - left_pad="1" - name="add_wearables_dummy_icon" - top="1" - visible="false" - width="184" > - </icon> - <icon - follows="bottom|left|right" - height="25" - image_name="Toolbar_Right_Off" - layout="topleft" - left="32" - name="dummy_right_icon" - top="1" - width="281" > - </icon> + <icon + follows="bottom|left|right" + height="25" + image_name="Toolbar_Right_Off" + layout="topleft" + left_pad="1" + name="dummy_right_icon" + width="184" > + </icon> </panel> - + + <!-- SAVE AND REVERT BUTTONS --> <panel follows="left|right|bottom" height="30" |