summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llaccordionctrl.cpp8
-rw-r--r--indra/llui/llaccordionctrltab.h1
-rw-r--r--indra/llui/lltextbase.cpp2
3 files changed, 8 insertions, 3 deletions
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp
index 6bf1347514..fc93793ed8 100644
--- a/indra/llui/llaccordionctrl.cpp
+++ b/indra/llui/llaccordionctrl.cpp
@@ -352,7 +352,7 @@ void LLAccordionCtrl::addCollapsibleCtrl(LLView* view)
mAccordionTabs.push_back(accordion_tab);
accordion_tab->setDropDownStateChangedCallback( boost::bind(&LLAccordionCtrl::onCollapseCtrlCloseOpen, this, mAccordionTabs.size() - 1) );
-
+ arrange();
}
void LLAccordionCtrl::removeCollapsibleCtrl(LLView* view)
@@ -523,6 +523,8 @@ void LLAccordionCtrl::arrangeMultiple()
void LLAccordionCtrl::arrange()
{
+ updateNoTabsHelpTextVisibility();
+
if( mAccordionTabs.size() == 0)
{
//We do not arrange if we do not have what should be arranged
@@ -541,6 +543,8 @@ void LLAccordionCtrl::arrange()
S32 panel_height = getRect().getHeight() - 2*BORDER_MARGIN;
+ if (accordion_tab->getFitParent())
+ panel_height = accordion_tab->getRect().getHeight();
ctrlSetLeftTopAndSize(accordion_tab,panel_rect.mLeft,panel_top,panel_width,panel_height);
show_hide_scrollbar(getRect().getWidth(),getRect().getHeight());
@@ -816,7 +820,7 @@ void LLAccordionCtrl::setFilterSubString(const std::string& filter_string)
{
LLStringUtil::format_map_t args;
args["[SEARCH_TERM]"] = LLURI::escape(filter_string);
- std::string text = mNoVisibleTabsOrigString;
+ std::string text = filter_string.empty() ? LLStringUtil::null : mNoVisibleTabsOrigString;
LLStringUtil::format(text, args);
mNoVisibleTabsHelpText->setValue(text);
diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h
index 82e0234bfc..480b26e130 100644
--- a/indra/llui/llaccordionctrltab.h
+++ b/indra/llui/llaccordionctrltab.h
@@ -190,6 +190,7 @@ public:
void showAndFocusHeader();
void setFitPanel( bool fit ) { mFitPanel = true; }
+ bool getFitParent() const { return mFitPanel; }
protected:
void adjustContainerPanel (const LLRect& child_rect);
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 72f3a14822..1a4b804ce4 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -2791,7 +2791,7 @@ bool LLImageTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width
height = llceil(mStyle->getFont()->getLineHeight());;
LLUIImagePtr image = mStyle->getImage();
- if( image.notNull())
+ if( num_chars>0 && image.notNull())
{
width += image->getWidth() + IMAGE_HPAD;
height = llmax(height, image->getHeight() + IMAGE_HPAD );