summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-05-26 23:02:54 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-05-26 23:03:04 +0300
commit8c9edebde752d69cfc120a1ddaf5dd7d6f6c27c4 (patch)
treebf08a3f12b2aaf1b655428223924ce7e96eea3d8 /indra
parent67e17bd822f146f333b91d353df6f55174ce4db6 (diff)
SL-19604 Properly account for borders
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelmaininventory.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 998a211795..39add4ee1c 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -2342,17 +2342,16 @@ void LLPanelMainInventory::updateCombinationVisibility()
LLRect galery_rect = mCombinationGalleryPanel->getRect();
LLRect inner_galery_rect = mCombinationGalleryPanel->getScrollableContainer()->getScrolledViewRect();
LLRect scroller_window_rect = mCombinationScrollPanel->getContentWindowRect();
- const S32 BORDER_PAD = 2; // two sides
inv_rect.mBottom = 0;
- inv_rect.mRight = inv_rect.mLeft + inv_inner_rect.getWidth();
+ inv_rect.mRight = inv_rect.mLeft + inv_inner_rect.getWidth() + mCombinationInventoryPanel->getScrollableContainer()->getBorderWidth();
if (!mCombinationGalleryPanel->hasVisibleItems() || mCombinationInventoryPanel->hasVisibleItems())
{
- inv_rect.mTop = inv_rect.mBottom + inv_inner_rect.getHeight() + BORDER_PAD;
+ inv_rect.mTop = inv_rect.mBottom + inv_inner_rect.getHeight() + mCombinationInventoryPanel->getScrollableContainer()->getBorderWidth();
}
else
{
- inv_rect.mTop = inv_rect.mBottom;
+ inv_rect.mTop = inv_rect.mBottom + mCombinationInventoryPanel->getScrollableContainer()->getBorderWidth();
}
galery_rect.mBottom = inv_rect.mTop;
@@ -2360,12 +2359,12 @@ void LLPanelMainInventory::updateCombinationVisibility()
if (mCombinationGalleryPanel->hasVisibleItems())
{
mCombinationGalleryPanel->setVisible(true);
- galery_rect.mTop = galery_rect.mBottom + inner_galery_rect.getHeight() + BORDER_PAD;
+ galery_rect.mTop = galery_rect.mBottom + inner_galery_rect.getHeight() + mCombinationGalleryPanel->getScrollableContainer()->getBorderWidth();
}
else
{
mCombinationGalleryPanel->setVisible(false);
- galery_rect.mTop = galery_rect.mBottom;
+ galery_rect.mTop = galery_rect.mBottom + mCombinationGalleryPanel->getScrollableContainer()->getBorderWidth();
}
mCombinationScroller->reshape(scroller_window_rect.getWidth(), inv_rect.getHeight() + galery_rect.getHeight(), true);