diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-02-08 14:35:56 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-02-08 14:35:56 +0200 |
commit | 693825158f478c478c1ab510c6f7304ae7f4a2ed (patch) | |
tree | ad3897cfa74c35364be3a8adf4b75fcb2693ca0c /indra/newview | |
parent | 1cc41cb9c4c4dfaa7e385e63dac25ff97c18e63a (diff) |
SL-19134 Remove lock icon, add item type icon
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llsidepaneliteminfo.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llsidepaneliteminfo.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/sidepanel_item_info.xml | 28 |
3 files changed, 23 insertions, 16 deletions
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 82a7719c52..8849e792c5 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -38,7 +38,9 @@ #include "llfloater.h" #include "llgroupactions.h" #include "llgroupmgr.h" +#include "lliconctrl.h" #include "llinventorydefines.h" +#include "llinventoryicon.h" #include "llinventorymodel.h" #include "llinventoryobserver.h" #include "lllineeditor.h" @@ -152,6 +154,7 @@ BOOL LLSidepanelItemInfo::postBuild() { mLabelOwnerName = getChild<LLTextBox>("LabelOwnerName"); mLabelCreatorName = getChild<LLTextBox>("LabelCreatorName"); + mItemTypeIcon = getChild<LLIconCtrl>("item_type_icon"); getChild<LLLineEditor>("LabelItemName")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe); getChild<LLUICtrl>("LabelItemName")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitName,this)); @@ -314,10 +317,12 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) getChild<LLUICtrl>("LabelItemName")->setValue(item->getName()); getChildView("LabelItemDescTitle")->setEnabled(TRUE); getChildView("LabelItemDesc")->setEnabled(is_modifiable); - getChildView("IconLocked")->setVisible(!is_modifiable); getChild<LLUICtrl>("LabelItemDesc")->setValue(item->getDescription()); getChild<LLUICtrl>("item_thumbnail")->setValue(item->getThumbnailUUID()); - + + LLUIImagePtr icon_img = LLInventoryIcon::getIcon(item->getType(), item->getInventoryType(), item->getFlags(), FALSE); + mItemTypeIcon->setImage(icon_img); + // Style for creator and owner links LLStyle::Params style_params; LLColor4 link_color = LLUIColorTable::instance().getColor("HTMLLinkColor"); diff --git a/indra/newview/llsidepaneliteminfo.h b/indra/newview/llsidepaneliteminfo.h index 249fd34e8a..d75de34fb8 100644 --- a/indra/newview/llsidepaneliteminfo.h +++ b/indra/newview/llsidepaneliteminfo.h @@ -39,6 +39,7 @@ class LLAvatarName; class LLButton; class LLFloater; +class LLIconCtrl; class LLViewerInventoryItem; class LLItemPropertiesObserver; class LLObjectInventoryObserver; @@ -102,6 +103,7 @@ private: LLTextBox* mLabelOwnerName; LLTextBox* mLabelCreatorName; + LLIconCtrl* mItemTypeIcon; // // UI Elements diff --git a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml index 320c20deb6..7fb9fb828d 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml @@ -60,28 +60,28 @@ layout="topleft" follows="all" height="25"> + <icon + follows="top|left" + height="16" + image_name="Inv_Object" + layout="topleft" + left="5" + mouse_opaque="true" + name="item_type_icon" + top="3" + width="16" /> <line_editor border_style="line" border_thickness="1" follows="left|top|right" layout="topleft" - left="5" + left_pad="5" top="1" - right="-25" + right="-5" height="20" max_length_bytes="63" name="LabelItemName" tool_tip="The name is limited to 63 characters. Longer prim names are cut short. Names can only consist of printable characters found in the ASCII-7 (non-extended) character set, with the exception of the vertical bar/pipe '|'." /> - <icon - follows="top|right" - height="18" - image_name="Lock" - layout="topleft" - right="-5" - mouse_opaque="true" - name="IconLocked" - top="3" - width="18" /> </layout_panel> <layout_panel @@ -248,7 +248,7 @@ TestString PleaseIgnore height="0" layout="topleft" left="5" - right="-6" + right="-5" name="cost_text_border" top="1"/> @@ -385,7 +385,7 @@ TestString PleaseIgnore height="0" layout="topleft" left="5" - right="-6" + right="-5" name="cost_text_border" top_pad="9"/> |