From 2a035c080dec2aa16b9628aac7b120e4f15135c2 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Fri, 16 Jun 2023 08:42:23 +0200 Subject: SL-18977 Borders of inventory view in inventory floater seem to be cut a bit --- indra/llui/llbutton.cpp | 3 +- indra/llui/llscrollcontainer.cpp | 12 ++--- indra/llui/lltabcontainer.cpp | 8 +-- indra/newview/llinventorypanel.cpp | 1 - indra/newview/llpanelmaininventory.cpp | 2 +- .../default/xui/en/panel_inventory_gallery.xml | 17 +++---- .../skins/default/xui/en/panel_main_inventory.xml | 57 +++++++++------------- .../skins/default/xui/en/sidepanel_inventory.xml | 55 +++++++++------------ 8 files changed, 64 insertions(+), 91 deletions(-) (limited to 'indra') diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 8028f397f3..a38b3323be 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -203,7 +203,8 @@ LLButton::LLButton(const LLButton::Params& p) } // Hack to make sure there is space for at least one character - if (getRect().getWidth() - (mRightHPad + mLeftHPad) < mGLFont->getWidth(std::string(" "))) + if (getRect().mRight >= 0 && getRect().getWidth() > 0 && + getRect().getWidth() - (mRightHPad + mLeftHPad) < mGLFont->getWidth(std::string(" "))) { // Use old defaults mLeftHPad = llbutton_orig_h_pad; diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp index c4cb739f0a..ad32f7186c 100644 --- a/indra/llui/llscrollcontainer.cpp +++ b/indra/llui/llscrollcontainer.cpp @@ -105,8 +105,8 @@ LLScrollContainer::LLScrollContainer(const LLScrollContainer::Params& p) mBorder = LLUICtrlFactory::create (params); LLView::addChild( mBorder ); - mInnerRect.set( 0, getRect().getHeight(), getRect().getWidth(), 0 ); - mInnerRect.stretch( -getBorderWidth() ); + mInnerRect = getLocalRect(); + mInnerRect.stretch( -getBorderWidth() ); LLRect vertical_scroll_rect = mInnerRect; vertical_scroll_rect.mLeft = vertical_scroll_rect.mRight - scrollbar_size; @@ -124,9 +124,9 @@ LLScrollContainer::LLScrollContainer(const LLScrollContainer::Params& p) mScrollbar[VERTICAL] = LLUICtrlFactory::create (sbparams); LLView::addChild( mScrollbar[VERTICAL] ); - LLRect horizontal_scroll_rect = mInnerRect; - horizontal_scroll_rect.mTop = horizontal_scroll_rect.mBottom + scrollbar_size; - horizontal_scroll_rect.mLeft += 3; + LLRect horizontal_scroll_rect; + horizontal_scroll_rect.mTop = scrollbar_size; + horizontal_scroll_rect.mRight = mInnerRect.getWidth(); sbparams.name("scrollable horizontal"); sbparams.rect(horizontal_scroll_rect); sbparams.orientation(LLScrollbar::HORIZONTAL); @@ -135,7 +135,7 @@ LLScrollContainer::LLScrollContainer(const LLScrollContainer::Params& p) sbparams.page_size(mInnerRect.getWidth()); sbparams.step_size(VERTICAL_MULTIPLE); sbparams.visible(false); - sbparams.follows.flags(FOLLOWS_LEFT | FOLLOWS_RIGHT); + sbparams.follows.flags(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_BOTTOM); sbparams.change_callback(p.scroll_callback); mScrollbar[HORIZONTAL] = LLUICtrlFactory::create (sbparams); LLView::addChild( mScrollbar[HORIZONTAL] ); diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 8c841540a5..f15e9771c0 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -1002,7 +1002,7 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) } else { - //Scip tab button space if they are invisible(EXT - 576) + // Skip tab button space if tabs are invisible (EXT-576) tab_panel_top = getRect().getHeight(); tab_panel_bottom = LLPANEL_BORDER_WIDTH; } @@ -1017,9 +1017,9 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) } else { - tab_panel_rect = LLRect(LLPANEL_BORDER_WIDTH, + tab_panel_rect = LLRect(LLPANEL_BORDER_WIDTH * 3, tab_panel_top, - getRect().getWidth()-LLPANEL_BORDER_WIDTH, + getRect().getWidth() - LLPANEL_BORDER_WIDTH * 2, tab_panel_bottom ); } child->setFollowsAll(); @@ -1106,7 +1106,7 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) p.follows.flags = p.follows.flags() | FOLLOWS_TOP; } else - { + { p.name("htab_"+std::string(child->getName())); p.visible(false); p.image_unselected(tab_img); diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 4bf447cb95..95f15c9c55 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -298,7 +298,6 @@ void LLInventoryPanel::initFolderRoot() // Scroller LLRect scroller_view_rect = getRect(); scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom); - scroller_view_rect.mTop -= 3; LLScrollContainer::Params scroller_params(mParams.scroll()); scroller_params.rect(scroller_view_rect); mScroller = LLUICtrlFactory::create(scroller_params); diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 30364e06eb..5ae61f0c36 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -2505,7 +2505,7 @@ void LLPanelMainInventory::setViewMode(EViewModeType mode) { std::list forward_history; std::list backward_history; - U32 sort_order; + U32 sort_order = 0; switch(mViewMode) { case MODE_LIST: diff --git a/indra/newview/skins/default/xui/en/panel_inventory_gallery.xml b/indra/newview/skins/default/xui/en/panel_inventory_gallery.xml index 2b80e30696..22cc926e75 100644 --- a/indra/newview/skins/default/xui/en/panel_inventory_gallery.xml +++ b/indra/newview/skins/default/xui/en/panel_inventory_gallery.xml @@ -6,19 +6,15 @@ follows="all" height="390" name="Inventory Gallery" - layout="topleft" - left="0" - top="0" - width="404"> + layout="topleft"> @@ -28,10 +24,9 @@ follows="all" height="390" layout="topleft" - left="4" + left="0" top="0" name="gallery_scroll_panel" - opaque="false" - top_pad="0"> + opaque="false"> diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index 64b885c222..b735dcf528 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -6,8 +6,7 @@ layout="topleft" min_height="300" min_width="240" - name="main inventory panel" - width="355"> + name="main inventory panel"> @@ -27,18 +26,18 @@ Multi_Folder_Mode Single_Folder_Mode + type="string" + length="1" + follows="left|top|right" + height="13" + layout="topleft" + left="12" + right="-12" + name="ItemcountText" + font="SansSerifMedium" + text_color="InventoryItemLinkColor" + use_ellipses="true" + top_pad="0"> Items: + top_pad="5"> + top="0"> + scroll.reserve_scroll_corner="false"> + scroll.reserve_scroll_corner="false"> + visible="false"> + name="objects panel"> + default_tab_group="1"> + height="560"> + height="300" /> + height="235"> Received items ([NUM]) Received items