diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-02-01 23:56:42 +0200 |
---|---|---|
committer | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-02-01 23:57:36 +0200 |
commit | db80fdb55b646164a71c58e9f4751b368afa3b9f (patch) | |
tree | 2b598a2e353137c7c8ae02c9868b3a10754ada94 /indra | |
parent | ac3f1b54ec6484442ea302570c14707e8bb263d2 (diff) |
SL-19104 update label and permissions display
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llfolderviewitem.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/strings.xml | 7 |
4 files changed, 18 insertions, 11 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index d10130619a..5d08d62b4b 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -162,7 +162,7 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p) sMouseOverColor = LLUIColorTable::instance().getColor("InventoryMouseOverColor", DEFAULT_WHITE); sFilterBGColor = LLUIColorTable::instance().getColor("FilterBackgroundColor", DEFAULT_WHITE); sFilterTextColor = LLUIColorTable::instance().getColor("FilterTextColor", DEFAULT_WHITE); - sSuffixColor = LLUIColorTable::instance().getColor("InventoryItemColor", DEFAULT_WHITE); + sSuffixColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); sSearchStatusColor = LLUIColorTable::instance().getColor("InventorySearchStatusColor", DEFAULT_WHITE); sColorSetInitialized = true; } @@ -395,7 +395,7 @@ S32 LLFolderViewItem::arrange( S32* width, S32* height ) // it is purely visual, so it is fine to do at our laisure refreshSuffix(); } - mLabelWidth = getLabelXPos() + getLabelFontForStyle(mLabelStyle)->getWidth(mLabel) + getLabelFontForStyle(mLabelStyle)->getWidth(mLabelSuffix) + mLabelPaddingRight; + mLabelWidth = getLabelXPos() + getLabelFontForStyle(mLabelStyle)->getWidth(mLabel) + getLabelFontForStyle(LLFontGL::NORMAL)->getWidth(mLabelSuffix) + mLabelPaddingRight; mLabelWidthDirty = false; } @@ -961,7 +961,8 @@ void LLFolderViewItem::draw() // if (!mLabelSuffix.empty()) { - font->renderUTF8( mLabelSuffix, 0, right_x, y, isFadeItem() ? color : (LLColor4)sSuffixColor, + const LLFontGL* suffix_font = getLabelFontForStyle(LLFontGL::NORMAL); + suffix_font->renderUTF8( mLabelSuffix, 0, right_x, y, isFadeItem() ? color : (LLColor4)sSuffixColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, &right_x, FALSE ); } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 8197a698e4..ae1ac6cc1e 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1963,9 +1963,9 @@ std::string LLItemBridge::getLabelSuffix() const { // String table is loaded before login screen and inventory items are // loaded after login, so LLTrans should be ready. - static std::string NO_COPY = LLTrans::getString("no_copy"); - static std::string NO_MOD = LLTrans::getString("no_modify"); - static std::string NO_XFER = LLTrans::getString("no_transfer"); + static std::string NO_COPY = LLTrans::getString("no_copy_lbl"); + static std::string NO_MOD = LLTrans::getString("no_modify_lbl"); + static std::string NO_XFER = LLTrans::getString("no_transfer_lbl"); static std::string LINK = LLTrans::getString("link"); static std::string BROKEN_LINK = LLTrans::getString("broken_link"); std::string suffix; @@ -1986,17 +1986,20 @@ std::string LLItemBridge::getLabelSuffix() const BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID()); if (!copy) { + suffix += " "; suffix += NO_COPY; } BOOL mod = item->getPermissions().allowModifyBy(gAgent.getID()); if (!mod) { - suffix += NO_MOD; + suffix += suffix.empty() ? " " : ","; + suffix += NO_MOD; } BOOL xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()); if (!xfer) { + suffix += suffix.empty() ? " " : ","; suffix += NO_XFER; } } @@ -5987,7 +5990,7 @@ std::string LLCallingCardBridge::getLabelSuffix() const LLViewerInventoryItem* item = getItem(); if( item && LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID()) ) { - return LLItemBridge::getLabelSuffix() + " (online)"; + return LLItemBridge::getLabelSuffix() + " online"; } else { diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index e013de2491..a825d04d7d 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -167,7 +167,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) : if (!sColorSetInitialized) { - sDefaultColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); + sDefaultColor = LLUIColorTable::instance().getColor("InventoryItemColor", DEFAULT_WHITE); sDefaultHighlightColor = LLUIColorTable::instance().getColor("MenuItemHighlightFgColor", DEFAULT_WHITE); sLibraryColor = LLUIColorTable::instance().getColor("InventoryItemLibraryColor", DEFAULT_WHITE); sLinkColor = LLUIColorTable::instance().getColor("InventoryItemLinkColor", DEFAULT_WHITE); diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index cf5d98aa9a..a3dfb9a618 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2395,8 +2395,11 @@ If you continue to receive this message, please contact Second Life support for <string name="no_modify" value=" (no modify)" /> <string name="no_copy" value=" (no copy)" /> <string name="worn" value=" (worn)" /> - <string name="link" value=" (link)" /> - <string name="broken_link" value=" (broken_link)" /> + <string name="link" value=" link" /> + <string name="broken_link" value=" broken_link" /> + <string name="no_transfer_lbl" value=" no transfer" /> + <string name="no_modify_lbl" value=" no modify" /> + <string name="no_copy_lbl" value=" no copy" /> <string name="LoadingContents">Loading contents...</string> <string name="NoContents">No contents</string> <string name="WornOnAttachmentPoint" value=" (worn on [ATTACHMENT_POINT])" /> |