From 5d4b48bbb4c20ad4fcbba31d92ebcf23ef5496a6 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 19 May 2010 15:23:51 +0300 Subject: EXT-7104 WIP Implemented a functionality to control the width of the chat entry field. * LLResizeBar calls notifyParent on resizing before changing rect of view, bottomtray processed this notification to update other buttons. * Had to move setup of buttons visibility on startup into LLBottomTray to ensure all buttons have necessary visibility BEFORE restore the width of the chat entry field; * Updated layout between chatbar and speak button to show resize mouse pointer in the middle between them. Implemented behavior: visible buttons shrink to their minimal width when the chat entry field gets wider. Also were refactored: * moved declaration of settings related to buttons visibility from the settings.xml to LLBottomTray. * moved setting of control listeners to LLBottomTray. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/403/ --HG-- branch : product-engine --- indra/newview/llbottomtray.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview/llbottomtray.h') diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 5588aefb42..74b8ed0d87 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -341,6 +341,17 @@ private: */ void showWellButton(EResizeState object_type, bool visible); + /** + * Handles a customization of chatbar width. + * + * When chatbar gets wider layout stack will reduce chiclet panel (it is auto-resizable) + * But once chiclet panel reaches its minimal width Stack will force to reduce buttons width. + * including Speak button. The similar behavior is when chatbar gets narrowly. + * This methods force resize behavior to resize buttons properly in these cases. + */ + void processChatbarCustomization(S32 new_width); + + MASK mResizeState; typedef std::map state_object_map_t; -- cgit v1.2.3 From 12d9aef217707ed866c0076107b0b935bd9f7fc7 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 19 May 2010 15:23:51 +0300 Subject: EXT-7104 WIP Added "Sidebar" button (disabled until callback is set) * Added widgets into xml, added setting and listener for context menu * added menu item to show/hide the button * button is made as may be hidden on resize Additional improvements: * Updated method to process buttons width when it is necessary to show any button via context menu * Updated LLBottomTray::initButtonsVisibility to not show warning messages if it is impossible to show a button due to bottom tray width on startup. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/403/ --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 74b8ed0d87..889dc42097 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -124,6 +124,7 @@ private: , RS_BUTTON_SEARCH = 0x0400 , RS_BUTTON_WORLD_MAP = 0x0800 , RS_BUTTON_MINI_MAP = 0x1000 + , RS_BUTTON_SIDEBAR = 0x2000 /* Once new button that can be hidden on resize is added don't forget to update related places: @@ -138,6 +139,7 @@ private: */ , RS_BUTTONS_CAN_BE_HIDDEN = RS_BUTTON_SNAPSHOT | RS_BUTTON_CAMERA | RS_BUTTON_MOVEMENT | RS_BUTTON_GESTURES | RS_BUTTON_BUILD | RS_BUTTON_SEARCH | RS_BUTTON_WORLD_MAP | RS_BUTTON_MINI_MAP + | RS_BUTTON_SIDEBAR }EResizeState; /** -- cgit v1.2.3