diff options
author | pavelkproductengine <pavelkproductengine@lindenlab.com> | 2016-01-27 17:21:25 +0200 |
---|---|---|
committer | pavelkproductengine <pavelkproductengine@lindenlab.com> | 2016-01-27 17:21:25 +0200 |
commit | 81ecf0c0f304aef72f8b558c732b5ed62acfb946 (patch) | |
tree | e817e6e970459982d5e789bc80780b2322e12897 /indra/newview/lloutfitgallery.h | |
parent | 5d576df19047ec45070f6571ebcada26e5c20756 (diff) |
MAINT-5194 Visual Outfit Browser
1) Changed algorithm for building gallery, which fixed item cropping when
switching between tabs in Appearance floater
2) Fixed gap between items in partially fille row
Diffstat (limited to 'indra/newview/lloutfitgallery.h')
-rw-r--r-- | indra/newview/lloutfitgallery.h | 45 |
1 files changed, 33 insertions, 12 deletions
diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h index 81a019f416..01d56d917f 100644 --- a/indra/newview/lloutfitgallery.h +++ b/indra/newview/lloutfitgallery.h @@ -78,11 +78,20 @@ protected: /*virtual*/ LLOutfitListGearMenuBase* createGearMenu(); private: - void rebuildGallery(); void loadPhotos(); void uploadPhoto(LLUUID outfit_id); bool checkRemovePhoto(LLUUID outfit_id); void setUploadedPhoto(LLUUID outfit_id, LLUUID asset_id); + void addToGallery(LLOutfitGalleryItem* item); + void removeFromGalleryLast(LLOutfitGalleryItem* item); + void removeFromGalleryMiddle(LLOutfitGalleryItem* item); + LLPanel* addLastRow(); + void removeLastRow(); + void moveRowUp(int row); + void moveRowDown(int row); + void moveRow(int row, int pos); + LLPanel* addToRow(LLPanel* row_stack, LLOutfitGalleryItem* item, int pos, int hgap); + void removeFromLastRow(LLOutfitGalleryItem* item); static void onLoadComplete(LLVFS *vfs, const LLUUID& asset_uuid, @@ -90,20 +99,32 @@ private: void* user_data, S32 status, LLExtStat ext_status); LLOutfitGalleryItem* buildGalleryItem(std::string name); - LLLayoutPanel* buildLayoutPanel(int left); - LLLayoutStack* buildLayoutStak(int left, int top); - + void buildGalleryPanel(int row_count); + void reshapeGalleryPanel(int row_count); + LLPanel* buildLayoutPanel(int left); + LLPanel* buildLayoutStak(int left, int bottom); + void moveLayoutStak(LLPanel* stack, int left, int bottom); LLView* mView; - std::vector<LLLayoutStack*> mLayouts; - std::vector<LLLayoutPanel*> mPanels; + std::vector<LLPanel*> mStacks; + std::vector<LLPanel*> mPanels; std::vector<LLOutfitGalleryItem*> mItems; + LLScrollContainer* mScrollPanel; + LLPanel* mGalleryPanel; + LLPanel* mLastRowStack; + bool galleryCreated; + int mRowCount; + int mItemsAddedCount; + + typedef std::map<LLUUID, LLOutfitGalleryItem*> outfit_map_t; + typedef outfit_map_t::value_type outfit_map_value_t; + outfit_map_t mOutfitMap; + typedef std::map<LLUUID, LLViewerInventoryItem*> texture_map_t; + typedef texture_map_t::value_type texture_map_value_t; + texture_map_t mTextureMap; + typedef std::map<LLOutfitGalleryItem*, int> item_num_map_t; + typedef item_num_map_t::value_type item_numb_map_value_t; + item_num_map_t mItemIndexMap; - typedef std::map<LLUUID, LLOutfitGalleryItem*> outfit_map_t; - typedef outfit_map_t::value_type outfit_map_value_t; - outfit_map_t mOutfitMap; - typedef std::map<LLUUID, LLViewerInventoryItem*> texture_map_t; - typedef texture_map_t::value_type texture_map_value_t; - texture_map_t mTextureMap; LLInventoryCategoriesObserver* mTexturesObserver; |