summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-11-22 20:18:30 +0200
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-11-22 20:18:30 +0200
commit9621dd8bbd1697b119574bcc879345f03b42969e (patch)
tree715cac1b7f70a54de3fcedc0af18111056a4b520 /indra/llui
parent4acfc99fa608269d06a5a3e45a4c3fdc5e3d06ee (diff)
SL-12100 Premium Enhancements - Changes to rates to create Groups, UI Work
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llscrolllistctrl.cpp8
-rw-r--r--indra/llui/llscrolllistctrl.h10
2 files changed, 11 insertions, 7 deletions
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index f4028057e8..7415e7d974 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -137,6 +137,7 @@ LLScrollListCtrl::Params::Params()
background_visible("background_visible"),
draw_stripes("draw_stripes"),
column_padding("column_padding"),
+ row_padding("row_padding", 2),
fg_unselected_color("fg_unselected_color"),
fg_selected_color("fg_selected_color"),
bg_selected_color("bg_selected_color"),
@@ -199,6 +200,7 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p)
mHoveredColor(p.hovered_color()),
mSearchColumn(p.search_column),
mColumnPadding(p.column_padding),
+ mRowPadding(p.row_padding),
mContextMenuType(MENU_NONE),
mIsFriendSignal(NULL)
{
@@ -685,8 +687,6 @@ bool LLScrollListCtrl::updateColumnWidths()
return width_changed;
}
-const S32 SCROLL_LIST_ROW_PAD = 2;
-
// Line height is the max height of all the cells in all the items.
void LLScrollListCtrl::updateLineHeight()
{
@@ -699,7 +699,7 @@ void LLScrollListCtrl::updateLineHeight()
S32 i = 0;
for (const LLScrollListCell* cell = itemp->getColumn(i); i < num_cols; cell = itemp->getColumn(++i))
{
- mLineHeight = llmax( mLineHeight, cell->getHeight() + SCROLL_LIST_ROW_PAD );
+ mLineHeight = llmax( mLineHeight, cell->getHeight() + mRowPadding );
}
}
}
@@ -711,7 +711,7 @@ void LLScrollListCtrl::updateLineHeightInsert(LLScrollListItem* itemp)
S32 i = 0;
for (const LLScrollListCell* cell = itemp->getColumn(i); i < num_cols; cell = itemp->getColumn(++i))
{
- mLineHeight = llmax( mLineHeight, cell->getHeight() + SCROLL_LIST_ROW_PAD );
+ mLineHeight = llmax( mLineHeight, cell->getHeight() + mRowPadding );
}
}
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index b35a8608e7..51e0819ecc 100644
--- a/indra/llui/llscrolllistctrl.h
+++ b/indra/llui/llscrolllistctrl.h
@@ -108,7 +108,8 @@ public:
// layout
Optional<S32> column_padding,
- page_lines,
+ row_padding,
+ page_lines,
heading_height;
// sort and search behavior
@@ -283,8 +284,10 @@ public:
void setBackgroundVisible(BOOL b) { mBackgroundVisible = b; }
void setDrawStripes(BOOL b) { mDrawStripes = b; }
- void setColumnPadding(const S32 c) { mColumnPadding = c; }
- S32 getColumnPadding() { return mColumnPadding; }
+ void setColumnPadding(const S32 c) { mColumnPadding = c; }
+ S32 getColumnPadding() const { return mColumnPadding; }
+ void setRowPadding(const S32 c) { mColumnPadding = c; }
+ S32 getRowPadding() const { return mColumnPadding; }
void setCommitOnKeyboardMovement(BOOL b) { mCommitOnKeyboardMovement = b; }
void setCommitOnSelectionChange(BOOL b) { mCommitOnSelectionChange = b; }
void setAllowKeyboardMovement(BOOL b) { mAllowKeyboardMovement = b; }
@@ -468,6 +471,7 @@ private:
LLRect mItemListRect;
S32 mColumnPadding;
+ S32 mRowPadding;
BOOL mBackgroundVisible;
BOOL mDrawStripes;