summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-06-01 23:11:27 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-06-01 23:11:27 +0300
commit777f3f48d0e56ceff3aa98a44c6e6437946ae4f3 (patch)
treef9b955a982c88ba113862a2e2a00f8e65f01421b /indra
parentf996c1c7744183c9ae96a697ad20a1d9fc03e9bb (diff)
SL-15291 Outfit Gallery shows 3 items per row when only 2 can fit
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lloutfitgallery.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index 272e7ae351..60724ef3d0 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -61,6 +61,8 @@ static LLPanelInjector<LLOutfitGallery> t_outfit_gallery("outfit_gallery");
#define MAX_OUTFIT_PHOTO_WIDTH 256
#define MAX_OUTFIT_PHOTO_HEIGHT 256
+const S32 GALLERY_ITEMS_PER_ROW_MIN = 2;
+
LLOutfitGallery::LLOutfitGallery(const LLOutfitGallery::Params& p)
: LLOutfitListBase(),
mTexturesObserver(NULL),
@@ -94,7 +96,7 @@ LLOutfitGallery::Params::Params()
item_width("item_width", 150),
item_height("item_height", 175),
item_horizontal_gap("item_horizontal_gap", 16),
- items_in_row("items_in_row", 3),
+ items_in_row("items_in_row", GALLERY_ITEMS_PER_ROW_MIN),
row_panel_width_factor("row_panel_width_factor", 166),
gallery_width_factor("gallery_width_factor", 163)
{
@@ -152,7 +154,7 @@ void LLOutfitGallery::updateRowsIfNeeded()
{
reArrangeRows(1);
}
- else if((mRowPanelWidth > (getRect().getWidth() + mItemHorizontalGap)) && mItemsInRow > 3)
+ else if((mRowPanelWidth > (getRect().getWidth() + mItemHorizontalGap)) && mItemsInRow > GALLERY_ITEMS_PER_ROW_MIN)
{
reArrangeRows(-1);
}