From 0247cd6aebd85d578b14778f20866616ef3ab05f Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Thu, 3 Mar 2011 20:49:42 +0200 Subject: STORM-236 FIXED Allow the "Speak" button to be removed, like other buttons. Cumulative diff of changes made by Wolfpup, Richard and me. Description: * Ability to hide the Speak button with the bottom tray context menu. * Made the chat input resize handle visible, so that the feature is easily discoverable. * Applied Richard's fix to layout panel resizing logic. --- indra/newview/llbottomtray.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/newview/llbottomtray.h') diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index dc98170049..32d4968521 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -116,6 +116,7 @@ public: void showMoveButton(BOOL visible); void showCameraButton(BOOL visible); void showSnapshotButton(BOOL visible); + void showSpeakButton(bool visible); void toggleMovementControls(); void toggleCameraControls(); @@ -390,6 +391,11 @@ private: */ bool setVisibleAndFitWidths(EResizeState object_type, bool visible); + /** + * Get panel containing the given button. + */ + LLPanel* getButtonPanel(EResizeState button_type); + /** * Shows/hides panel with specified well button (IM or Notification) * @@ -410,6 +416,7 @@ private: void processChatbarCustomization(S32 new_width); + /// Buttons automatically hidden due to lack of space. MASK mResizeState; typedef std::map state_object_map_t; @@ -424,6 +431,7 @@ private: * Contains order in which child buttons should be processed in show/hide, extend/shrink methods. */ resize_state_vec_t mButtonsProcessOrder; + /** * Contains order in which child buttons are shown. * It traces order of all bottomtray buttons that may change place via drag'n'drop and should -- cgit v1.2.3 From 211465b77282ec5981f8b052c9ff8d4277a10d5f Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Fri, 4 Mar 2011 13:46:57 +0200 Subject: STORM-236 WIP Minor code improvements. - To decrease code duplication: * Added RS_BUTTON_SPEAK to the button->panel mapping (mStateProcessedObjectMap). * Replaces all lookups in mStateProcessedObjectMap with calls to getButtonPanel(). - Added some comments. --- indra/newview/llbottomtray.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/llbottomtray.h') diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 32d4968521..76d80b8e0b 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -393,6 +393,8 @@ private: /** * Get panel containing the given button. + * + * @see mStateProcessedObjectMap */ LLPanel* getButtonPanel(EResizeState button_type); @@ -415,13 +417,21 @@ private: */ void processChatbarCustomization(S32 new_width); + /// Get button name for debugging. + static std::string resizeStateToString(EResizeState state); /// Buttons automatically hidden due to lack of space. MASK mResizeState; + /** + * Mapping of button types to the layout panels the buttons are wrapped in. + * + * Used by getButtonPanel(). + */ typedef std::map state_object_map_t; state_object_map_t mStateProcessedObjectMap; + /// Default (maximum) widths of the layout panels. typedef std::map state_object_width_map_t; state_object_width_map_t mObjectDefaultWidthMap; -- cgit v1.2.3 From 176b025a26e11fa9133a4a4c9fbc2cfa4f7cf616 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Fri, 4 Mar 2011 19:10:54 +0200 Subject: STORM-236 WIP Additional fixes. Fixed: * Wrong ability to place a button between the chat input and the drag handle (thanks Wolfpup!). * Broken drag-n-drop cursors. --- indra/newview/llbottomtray.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llbottomtray.h') diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 76d80b8e0b..04e5f5e9e0 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -469,6 +469,7 @@ protected: LLSpeakButton* mSpeakBtn; LLNearbyChatBar* mNearbyChatBar; LLLayoutPanel* mChatBarContainer; + LLPanel* mNearbyCharResizeHandlePanel; LLLayoutStack* mToolbarStack; LLMenuGL* mBottomTrayContextMenu; LLButton* mCamButton; -- cgit v1.2.3