summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rwxr-xr-x[-rw-r--r--]indra/llui/llfolderviewitem.cpp29
-rwxr-xr-x[-rw-r--r--]indra/llui/llfolderviewitem.h6
2 files changed, 21 insertions, 14 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 52923389cd..7ca02b726a 100644..100755
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -98,6 +98,7 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p)
: LLView(p),
mLabelWidth(0),
mLabelWidthDirty(false),
+ mLabelPaddingRight(DEFAULT_TEXT_PADDING_RIGHT),
mParentFolder( NULL ),
mIsSelected( FALSE ),
mIsCurSelection( FALSE ),
@@ -291,7 +292,7 @@ S32 LLFolderViewItem::arrange( S32* width, S32* height )
: 0;
if (mLabelWidthDirty)
{
- mLabelWidth = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + getLabelFontForStyle(mLabelStyle)->getWidth(mLabel) + getLabelFontForStyle(mLabelStyle)->getWidth(mLabelSuffix) + TEXT_PAD_RIGHT;
+ mLabelWidth = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + getLabelFontForStyle(mLabelStyle)->getWidth(mLabel) + getLabelFontForStyle(mLabelStyle)->getWidth(mLabelSuffix) + mLabelPaddingRight;
mLabelWidthDirty = false;
}
@@ -609,12 +610,13 @@ void LLFolderViewItem::draw()
static LLUIColor sSearchStatusColor = LLUIColorTable::instance().getColor("InventorySearchStatusColor", DEFAULT_WHITE);
static LLUIColor sMouseOverColor = LLUIColorTable::instance().getColor("InventoryMouseOverColor", DEFAULT_WHITE);
+
const Params& default_params = LLUICtrlFactory::getDefaultParams<LLFolderViewItem>();
const S32 TOP_PAD = default_params.item_top_pad;
const S32 FOCUS_LEFT = 1;
const LLFontGL* font = getLabelFontForStyle(mLabelStyle);
- getViewModelItem()->update();
+ getViewModelItem()->update();
//--------------------------------------------------------------------------------//
// Draw open folder arrow
@@ -770,7 +772,7 @@ void LLFolderViewItem::draw()
//
font->renderUTF8(mLabel, 0, text_left, y, color,
LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
- S32_MAX, getRect().getWidth() - (S32) text_left, &right_x, TRUE);
+ S32_MAX, getRect().getWidth() - (S32) text_left - mLabelPaddingRight, &right_x, TRUE);
//--------------------------------------------------------------------------------//
// Draw label suffix
@@ -785,15 +787,18 @@ void LLFolderViewItem::draw()
//--------------------------------------------------------------------------------//
// Highlight string match
//
- if (filter_string_length > 0)
- {
- F32 match_string_left = text_left + font->getWidthF32(combined_string, 0, mViewModelItem->getFilterStringOffset());
- F32 yy = (F32)getRect().getHeight() - font->getLineHeight() - (F32)TEXT_PAD - (F32)TOP_PAD;
- font->renderUTF8( combined_string, mViewModelItem->getFilterStringOffset(), match_string_left, yy,
- sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
- filter_string_length, S32_MAX, &right_x, FALSE );
- }
- }
+ if (filter_string_length > 0)
+ {
+ F32 match_string_left = text_left + font->getWidthF32(combined_string, 0, mViewModelItem->getFilterStringOffset());
+ F32 yy = (F32)getRect().getHeight() - font->getLineHeight() - (F32)TEXT_PAD - (F32)TOP_PAD;
+ font->renderUTF8( combined_string, mViewModelItem->getFilterStringOffset(), match_string_left, yy,
+ sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
+ filter_string_length, S32_MAX, &right_x, FALSE );
+ }
+
+
+ LLView::draw();
+}
const LLFolderViewModelInterface* LLFolderViewItem::getFolderViewModel( void ) const
{
diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h
index 141956c3f0..7025b94a9a 100644..100755
--- a/indra/llui/llfolderviewitem.h
+++ b/indra/llui/llfolderviewitem.h
@@ -68,7 +68,7 @@ public:
ICON_PAD = 2,
ICON_WIDTH = 16,
TEXT_PAD = 1,
- TEXT_PAD_RIGHT = 4,
+ DEFAULT_TEXT_PADDING_RIGHT = 4,
ARROW_SIZE = 12,
MAX_FOLDER_ITEM_OVERLAP = 2;
@@ -85,6 +85,7 @@ protected:
std::string mLabel;
S32 mLabelWidth;
bool mLabelWidthDirty;
+ S32 mLabelPaddingRight;
LLFolderViewFolder* mParentFolder;
LLFolderViewModelItem* mViewModelItem;
LLFontGL::StyleFlags mLabelStyle;
@@ -230,7 +231,7 @@ public:
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
- virtual LLView* findChildView(const std::string& name, BOOL recurse) const { return NULL; }
+ //virtual LLView* findChildView(const std::string& name, BOOL recurse) const { return LLView::findChildView(name, recurse); }
// virtual void handleDropped();
virtual void draw();
@@ -242,6 +243,7 @@ public:
private:
static std::map<U8, LLFontGL*> sFonts; // map of styles to fonts
+
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~