From 4e901957f9414284fa26ca70122f952243e4122c Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 30 Dec 2009 15:46:53 -0800 Subject: EXT-3753 Made inventory subfolders indent more. Changed back to 8 pixel indent, as Ben Glenn was seeing confusion in user tests with lesser indents. Made it a setting, FolderIndentation in case we want to change in the future. Reviewed with Leyla. --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llfolderview.cpp | 3 ++- indra/newview/llfolderviewitem.cpp | 3 ++- indra/newview/llfolderviewitem.h | 3 +-- 4 files changed, 16 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 0ee39c2fc8..55db13e44a 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3235,6 +3235,17 @@ Value 0.75 + FolderIndentation + + Comment + Number of pixels to indent subfolders in inventory + Persist + 1 + Type + S32 + Value + 8 + FolderLoadingMessageWaitTime Comment diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 474d2ca21f..112b23d2df 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -206,7 +206,8 @@ LLFolderView::LLFolderView(const Params& p) mAutoOpenCandidate = NULL; mAutoOpenTimer.stop(); mKeyboardSelection = FALSE; - mIndentation = -LEFT_INDENTATION; // children start at indentation 0 + static LLUICachedControl indentation("FolderIndentation", 0); + mIndentation = -indentation; // children start at indentation 0 gIdleCallbacks.addFunction(idle, this); //clear label diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 720c2c7b1a..9d54aafd67 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -392,10 +392,11 @@ BOOL LLFolderViewItem::addToFolder(LLFolderViewFolder* folder, LLFolderView* roo // makes sure that this view and it's children are the right size. S32 LLFolderViewItem::arrange( S32* width, S32* height, S32 filter_generation) { + static LLUICachedControl indentation("FolderIndentation", 0); mIndentation = (getParentFolder() && getParentFolder()->getParentFolder() && getParentFolder()->getParentFolder()->getParentFolder()) - ? mParentFolder->getIndentation() + LEFT_INDENTATION + ? mParentFolder->getIndentation() + indentation : 0; if (mLabelWidthDirty) { diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 21e24c2a4d..6f8c738a59 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -93,7 +93,6 @@ public: static void initClass(); static void cleanupClass(); - // jamesdebug was LLUICtrl::Params struct Params : public LLInitParam::Block { Optional icon; @@ -111,7 +110,7 @@ public: // layout constants static const S32 LEFT_PAD = 5; - static const S32 LEFT_INDENTATION = 2; + // LEFT_INDENTATION is set via settings.xml FolderIndentation static const S32 ICON_PAD = 2; static const S32 ICON_WIDTH = 16; static const S32 TEXT_PAD = 1; -- cgit v1.2.3