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 | |
| 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
| -rw-r--r-- | indra/newview/llbottomtray.cpp | 26 | ||||
| -rw-r--r-- | indra/newview/llbottomtray.h | 3 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_bottomtray.xml | 63 | 
3 files changed, 12 insertions, 80 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; diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 8395b484cf..54258f74c1 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -205,9 +205,6 @@ private:  	typedef std::map<EResizeState, S32> state_object_width_map_t;  	state_object_width_map_t mObjectDefaultWidthMap; -	typedef std::map<EResizeState, LLUICtrl*> dummies_map_t; -	dummies_map_t mDummiesMap; -  protected:  	LLBottomTray(const LLSD& key = LLSD()); diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index e412c491fd..3beacd49e1 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -59,9 +59,9 @@           height="28"           layout="topleft"           min_height="28" -         width="105" +         width="108"           top_delta="0" -         min_width="54" +         min_width="57"           name="speak_panel"           user_resize="false">            <talk_button @@ -91,17 +91,6 @@                </show_button>            </talk_button>          </layout_panel> -        <icon -            auto_resize="false" -            follows="left|right" -            height="10" -            image_name="spacer24.tga" -            layout="topleft" -            left="0" -            name="after_speak_panel" -            min_width="3" -            top="0" -            width="3"/>          <layout_panel           mouse_opaque="false"           auto_resize="false" @@ -109,9 +98,9 @@           height="28"           layout="topleft"           min_height="28" -         width="82" +         width="85"           top_delta="0" -         min_width="62" +         min_width="65"           name="gesture_panel"           user_resize="false">           <gesture_combo_list @@ -131,18 +120,6 @@                page_lines="17" />           </gesture_combo_list>          </layout_panel> -		 <icon -         auto_resize="false" -         color="0 0 0 0" -         follows="left|right" -         height="10" -         image_name="spacer24.tga" -         layout="topleft" -         left="0" -         min_width="3" -         name="after_gesture_panel" -         top="0" -         width="3"/>          <layout_panel           mouse_opaque="false"           auto_resize="false" @@ -152,8 +129,8 @@           min_height="28"           name="movement_panel"           user_resize="false" -         width="80" -         min_width="49"> +         width="83" +         min_width="52">              <button                   image_selected="PushButton_Selected_Press"                   image_pressed="PushButton_Press" @@ -173,18 +150,6 @@                   parameter="moveview" />              </button>          </layout_panel> -         <icon -         auto_resize="false" -         color="0 0 0 0" -         follows="left|right" -         height="10" -         image_name="spacer24.tga" -         layout="topleft" -         left="0" -         min_width="3" -         name="after_movement_panel" -         top="0" -         width="3"/>          <layout_panel           mouse_opaque="false"           auto_resize="false" @@ -192,10 +157,10 @@           height="28"           layout="topleft"           min_height="28" -         min_width="49" +         min_width="52"           name="cam_panel"           user_resize="false" -         width="80"> +         width="83">              <button                   image_selected="PushButton_Selected_Press"                   image_pressed="PushButton_Press" @@ -216,18 +181,6 @@                   parameter="camera" />              </button>          </layout_panel> -        <icon -         auto_resize="false" -         color="0 0 0 0" -         follows="left|right" -         height="10" -         image_name="spacer24.tga" -         layout="topleft" -         left="0" -         min_width="3" -         name="after_cam_panel" -         top="0" -         width="3"/>          <layout_panel           mouse_opaque="false"           auto_resize="false" | 
