Skip to content
Snippets Groups Projects
Commit 65fe37a9 authored by Andrey Kleshchev's avatar Andrey Kleshchev
Browse files

SL-19604 Fix gallery view having huge ident at the bottom

parent f30ae5c7
No related branches found
No related tags found
No related merge requests found
......@@ -523,6 +523,15 @@ void LLLayoutStack::updateLayout()
mNeedsLayout = continue_animating;
} // end LLLayoutStack::updateLayout
void LLLayoutStack::setPanelSpacing(S32 val)
{
if (mPanelSpacing != val)
{
mPanelSpacing = val;
mNeedsLayout = true;
}
}
LLLayoutPanel* LLLayoutStack::findEmbeddedPanel(LLPanel* panelp) const
{
if (!panelp) return NULL;
......
......@@ -91,6 +91,7 @@ class LLLayoutStack : public LLView, public LLInstanceTracker<LLLayoutStack>
void updateLayout();
S32 getPanelSpacing() const { return mPanelSpacing; }
void setPanelSpacing(S32 val);
static void updateClass();
......
......@@ -256,6 +256,7 @@ BOOL LLPanelMainInventory::postBuild()
mCombinationViewPanel = getChild<LLPanel>("combination_view_inventory");
mCombinationGalleryLayoutPanel = getChild<LLLayoutPanel>("comb_gallery_layout");
mCombinationListLayoutPanel = getChild<LLLayoutPanel>("comb_inventory_layout");
mCombinationLayoutStack = getChild<LLLayoutStack>("combination_view_stack");
mCombinationInventoryPanel = getChild<LLInventorySingleFolderPanel>("comb_single_folder_inv");
LLInventoryFilter& comb_inv_filter = mCombinationInventoryPanel->getFilter();
......@@ -2371,6 +2372,7 @@ void LLPanelMainInventory::updatePanelVisibility()
comb_gallery_filter.setFilterThumbnails(LLInventoryFilter::FILTER_INCLUDE_THUMBNAILS);
comb_gallery_filter.markDefault();
mCombinationLayoutStack->setPanelSpacing(0);
mCombinationGalleryLayoutPanel->setVisible(mSingleFolderMode && isGalleryViewMode());
mCombinationGalleryPanel->setVisible(mSingleFolderMode && isGalleryViewMode()); // to prevent or process updates
mCombinationListLayoutPanel->setVisible(mSingleFolderMode && isListViewMode());
......@@ -2390,6 +2392,10 @@ void LLPanelMainInventory::updateCombinationVisibility()
{
bool is_gallery_empty = !mCombinationGalleryPanel->hasVisibleItems();
bool show_inv_pane = mCombinationInventoryPanel->hasVisibleItems() || is_gallery_empty || mForceShowInvLayout;
const S32 DRAG_HANDLE_PADDING = 12; // for drag handle to not overlap gallery when both inventories are visible
mCombinationLayoutStack->setPanelSpacing(show_inv_pane ? DRAG_HANDLE_PADDING : 0);
mCombinationGalleryLayoutPanel->setVisible(!is_gallery_empty);
mCombinationListLayoutPanel->setVisible(show_inv_pane);
mCombinationInventoryPanel->getRootFolder()->setForceArrange(!show_inv_pane);
......
......@@ -210,7 +210,8 @@ class LLPanelMainInventory : public LLPanel, LLInventoryObserver
LLInventorySingleFolderPanel* mCombinationInventoryPanel;
LLInventoryGallery* mCombinationGalleryPanel;
LLPanel* mCombinationGalleryLayoutPanel;
LLPanel* mCombinationListLayoutPanel;
LLLayoutPanel* mCombinationListLayoutPanel;
LLLayoutStack* mCombinationLayoutStack;
boost::signals2::connection mListViewRootUpdatedConnection;
boost::signals2::connection mGalleryRootUpdatedConnection;
......
......@@ -271,7 +271,7 @@
<panel
follows="all"
halign="center"
height="372"
height="375"
layout="topleft"
left="7"
name="combination_view_inventory"
......@@ -280,9 +280,9 @@
<layout_stack
follows="all"
layout="topleft"
height="372"
height="375"
name="combination_view_stack"
animate="false"
drag_handle_gap="13"
drag_handle_thickness="6"
drag_handle_first_indent="18"
drag_handle_second_indent="18"
......@@ -296,7 +296,7 @@
bevel_style="in"
user_resize="true"
auto_resize="true"
height="246"
height="248"
min_width="150"
name="comb_gallery_layout">
<panel
......@@ -304,7 +304,7 @@
filename="panel_inventory_gallery.xml"
left="0"
top="1"
height="246"
height="248"
name="comb_gallery_view_inv"
background_visible="true"
follows="all"
......@@ -316,7 +316,7 @@
bevel_style="in"
user_resize="true"
auto_resize="true"
height="126"
height="127"
min_height="100"
name="comb_inventory_layout">
<single_folder_inventory_panel
......@@ -324,7 +324,7 @@
follows="all"
left="0"
top="1"
height="126"
height="127"
layout="topleft"
show_item_link_overlays="true"
bg_opaque_color="DkGray2"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment