summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/lltoolbar.cpp4
-rw-r--r--indra/llui/lltoolbar.h6
2 files changed, 8 insertions, 2 deletions
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index 1f5fa5f361..5f7afb07fc 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -86,6 +86,7 @@ LLToolBar::Params::Params()
pad_right("pad_right"),
pad_bottom("pad_bottom"),
pad_between("pad_between"),
+ min_girth("min_girth"),
button_panel("button_panel")
{}
@@ -103,6 +104,7 @@ LLToolBar::LLToolBar(const LLToolBar::Params& p)
mPadTop(p.pad_top),
mPadBottom(p.pad_bottom),
mPadBetween(p.pad_between),
+ mMinGirth(p.min_girth),
mPopupMenuHandle(),
mStartDragItemCallback(NULL),
mHandleDragItemCallback(NULL),
@@ -517,6 +519,8 @@ void LLToolBar::updateLayoutAsNeeded()
S32 total_girth = cur_row // current row position...
+ max_row_girth // ...incremented by size of final row...
+ girth_pad_end; // ...plus padding reserved on end
+ total_girth = llmax(total_girth,mMinGirth);
+
max_row_length = llmax(max_row_length, row_running_length - mPadBetween + row_pad_end);
resizeButtonsInRow(buttons_in_row, max_row_girth);
diff --git a/indra/llui/lltoolbar.h b/indra/llui/lltoolbar.h
index 4fac081130..be0589f3c6 100644
--- a/indra/llui/lltoolbar.h
+++ b/indra/llui/lltoolbar.h
@@ -141,7 +141,8 @@ public:
pad_top,
pad_right,
pad_bottom,
- pad_between;
+ pad_between,
+ min_girth;
// get rid of this
Multiple<LLCommandId::Params> commands;
@@ -219,7 +220,8 @@ private:
mPadRight,
mPadTop,
mPadBottom,
- mPadBetween;
+ mPadBetween,
+ mMinGirth;
LLToolBarButton::Params mButtonParams[LLToolBarEnums::BTNTYPE_COUNT];