diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/lllayoutstack.cpp | 9 | ||||
-rw-r--r-- | indra/llui/lllayoutstack.h | 1 | ||||
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llpanelmaininventory.h | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_main_inventory.xml | 14 |
5 files changed, 25 insertions, 8 deletions
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 08ce31ffc5..b1968e6a42 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -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; diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h index 02685281ef..000b919ae7 100644 --- a/indra/llui/lllayoutstack.h +++ b/indra/llui/lllayoutstack.h @@ -91,6 +91,7 @@ public: void updateLayout(); S32 getPanelSpacing() const { return mPanelSpacing; } + void setPanelSpacing(S32 val); static void updateClass(); diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 5ae61f0c36..27c8f10889 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -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); diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index bdc62fd8f7..79501e63bc 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -210,7 +210,8 @@ private: LLInventorySingleFolderPanel* mCombinationInventoryPanel; LLInventoryGallery* mCombinationGalleryPanel; LLPanel* mCombinationGalleryLayoutPanel; - LLPanel* mCombinationListLayoutPanel; + LLLayoutPanel* mCombinationListLayoutPanel; + LLLayoutStack* mCombinationLayoutStack; boost::signals2::connection mListViewRootUpdatedConnection; boost::signals2::connection mGalleryRootUpdatedConnection; 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 b735dcf528..f7a9c552cc 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -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" |