From 3eafbeaac57c952b674fb134124354036c9bb967 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 10 Nov 2009 15:02:42 +0200 Subject: Work on major sub-task EXT-991 (Update bottom bar behavior on resize) Initial refactoring of functionality: - Re-Fixed bug with visibility of chiclet panel of the min size - updated bottomtray xml to make buttons identical to each other - Imroved logic while resizing of bottom tray (changing width of chiclet & nearby panels, hide/show buttons) --HG-- branch : product-engine --- indra/newview/llbottomtray.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'indra/newview/llbottomtray.h') diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 02588a1975..4a763e6c7c 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -52,6 +52,7 @@ class LLBottomTray , public LLPanel , public LLIMSessionObserver { + LOG_CLASS(LLBottomTray); friend class LLSingleton; public: ~LLBottomTray(); @@ -83,17 +84,13 @@ public: private: - enum EResizeState - { - STATE_CHICLET_PANEL = 1, - STATE_CHATBAR_INPUT, - STATE_BUTTONS - }; - void updateResizeState(S32 width, S32 height); void verifyChildControlsSizes(); + void log(LLView* panel, const std::string& descr); + bool processShowButton(LLPanel* panel, S32* available_width); + bool canButtonBeShown(LLPanel* panel) const; - EResizeState mResizeState; + MASK mResizeState; protected: -- cgit v1.2.3 From 9ab02a68bbb735f89d4c633697a7917ca2fa3839 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 11 Nov 2009 13:53:04 +0200 Subject: Work on major sub-task EXT-991 (Update bottom bar behavior on resize) Code refactored: - move calculating of buttons_required_width inside processShowButton(); - remove changing of delta_width out of processing each button while increasing width --HG-- branch : product-engine --- indra/newview/llbottomtray.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llbottomtray.h') diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 4a763e6c7c..509f8b1e41 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -84,10 +84,10 @@ public: private: - void updateResizeState(S32 width, S32 height); + void updateResizeState(S32 new_width, S32 cur_width); void verifyChildControlsSizes(); void log(LLView* panel, const std::string& descr); - bool processShowButton(LLPanel* panel, S32* available_width); + bool processShowButton(LLPanel* panel, S32* available_width, S32* buttons_required_width); bool canButtonBeShown(LLPanel* panel) const; MASK mResizeState; -- cgit v1.2.3 From 3862e9721906d2bbdf61cfcc4d6970a24ce7e6e0 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 11 Nov 2009 16:17:29 +0200 Subject: Work on major sub-task EXT-991 (Update bottom bar behavior on resize) Code refactored: - processShowButton() now gets type of buttons should be shown instead of object - removed unnecessary code --HG-- branch : product-engine --- indra/newview/llbottomtray.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'indra/newview/llbottomtray.h') diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 509f8b1e41..c2eeef239c 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -83,15 +83,31 @@ public: void showSnapshotButton(BOOL visible); private: + typedef enum e_resize_status_type + { + RS_NORESIZE = 0x0000 + , RS_CHICLET_PANEL = 0x0001 + , RS_CHATBAR_INPUT = 0x0002 + , RS_BUTTON_SNAPSHOT = 0x0004 + , RS_BUTTON_CAMERA = 0x0008 + , RS_BUTTON_MOVEMENT = 0x0010 + , RS_BUTTON_GESTURES = 0x0020 + , RS_BUTTON_SPEAK = 0x0040 + , RS_RESIZABLE_BUTTONS = /*RS_BUTTON_SNAPSHOT | */RS_BUTTON_CAMERA | RS_BUTTON_MOVEMENT | RS_BUTTON_GESTURES + }EResizeState; void updateResizeState(S32 new_width, S32 cur_width); void verifyChildControlsSizes(); void log(LLView* panel, const std::string& descr); - bool processShowButton(LLPanel* panel, S32* available_width, S32* buttons_required_width); + bool processShowButton(EResizeState shown_object_type, S32* available_width, S32* buttons_required_width); bool canButtonBeShown(LLPanel* panel) const; + void initStateProcessedObjectMap(); MASK mResizeState; + typedef std::map state_object_map_t; + state_object_map_t mStateProcessedObjectMap; + protected: LLBottomTray(const LLSD& key = LLSD()); -- cgit v1.2.3 From 454c02102c71e39fc0d844a1ae8bd70873de01a1 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 11 Nov 2009 16:42:18 +0200 Subject: Work on major sub-task EXT-991 (Update bottom bar behavior on resize) Code refactored: - moved code to process width increasing into separate method --HG-- branch : product-engine --- indra/newview/llbottomtray.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llbottomtray.h') diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index c2eeef239c..6509fea63d 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -98,6 +98,8 @@ private: void updateResizeState(S32 new_width, S32 cur_width); void verifyChildControlsSizes(); + void processWidthDecreased(S32 delta_width); + void processWidthIncreased(S32 delta_width); void log(LLView* panel, const std::string& descr); bool processShowButton(EResizeState shown_object_type, S32* available_width, S32* buttons_required_width); bool canButtonBeShown(LLPanel* panel) const; -- cgit v1.2.3