diff options
author | Mike Antipov <mantipov@productengine.com> | 2010-05-12 17:15:46 +0300 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2010-05-12 17:15:46 +0300 |
commit | 79332f4e3e1131fbab88b7b75cca7ab57c3c3e25 (patch) | |
tree | 21f5cab4b3fbe7cd3e2c6e44bb425a50573c03e1 /indra/newview/llbottomtray.cpp | |
parent | 0815eb1ce49ddbf647b90b3353c046ab194ecc58 (diff) |
EXT-7104 : WIP : Removed dummy icons between buttons may be hidden to simplify adding new buttons.
* removed dummy icons
* encreased width and minimal width of next to the left layout panels to icons' widths.
* removed code processed dummy icons
Reviewed by Vadim.
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llbottomtray.cpp')
-rw-r--r-- | indra/newview/llbottomtray.cpp | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 04a6c48b4f..774248ce4d 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -1122,11 +1122,6 @@ void LLBottomTray::initStateProcessedObjectMap() mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MOVEMENT, mMovementPanel)); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_CAMERA, mCamPanel)); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SNAPSHOT, mSnapshotPanel)); - - mDummiesMap.insert(std::make_pair(RS_BUTTON_GESTURES, getChild<LLUICtrl>("after_gesture_panel"))); - mDummiesMap.insert(std::make_pair(RS_BUTTON_MOVEMENT, getChild<LLUICtrl>("after_movement_panel"))); - mDummiesMap.insert(std::make_pair(RS_BUTTON_CAMERA, getChild<LLUICtrl>("after_cam_panel"))); - mDummiesMap.insert(std::make_pair(RS_BUTTON_SPEAK, getChild<LLUICtrl>("after_speak_panel"))); } void LLBottomTray::setTrayButtonVisible(EResizeState shown_object_type, bool visible) @@ -1140,12 +1135,6 @@ void LLBottomTray::setTrayButtonVisible(EResizeState shown_object_type, bool vis } panel->setVisible(visible); - - if (mDummiesMap.count(shown_object_type)) - { - // Hide/show layout panel for dummy icon. - mDummiesMap[shown_object_type]->getParent()->setVisible(visible); - } } void LLBottomTray::setTrayButtonVisibleIfPossible(EResizeState shown_object_type, bool visible, bool raise_notification) @@ -1168,20 +1157,13 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible return false; } - const S32 dummy_width = mDummiesMap.count(object_type) - ? mDummiesMap[object_type]->getParent()->getRect().getWidth() - : 0; - bool is_set = true; if (visible) { - // Assume that only chiclet panel can be auto-resized and - // don't take into account width of dummy widgets + // Assume that only chiclet panel can be auto-resized const S32 available_width = - mChicletPanel->getParent()->getRect().getWidth() - - mChicletPanel->getMinWidth() - - dummy_width; + mChicletPanel->getParent()->getRect().getWidth() - mChicletPanel->getMinWidth(); S32 preferred_width = mObjectDefaultWidthMap[object_type]; S32 current_width = cur_panel->getRect().getWidth(); @@ -1249,7 +1231,7 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible // Shrink buttons if needed if (is_set && decrease_width) { - processWidthDecreased( -result_width - dummy_width ); + processWidthDecreased( -result_width); } } else @@ -1264,7 +1246,7 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible // Extend other buttons if need if (delta_width) { - processWidthIncreased(delta_width + dummy_width); + processWidthIncreased(delta_width); } } return is_set; |