diff options
| author | richard <none@none> | 2009-10-30 18:24:42 -0700 | 
|---|---|---|
| committer | richard <none@none> | 2009-10-30 18:24:42 -0700 | 
| commit | d8d678307c1831ee5f8580c709c4430e2ce7fd8d (patch) | |
| tree | 09aa15753fb0a02a4a96d91504995b1dc24d7b70 /indra/newview | |
| parent | 2fadd99877eceb55077957b5bab6353611184c86 (diff) | |
| parent | c964f281906e760c88c4f01edc566df35291ddff (diff) | |
merge
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llexpandabletextbox.cpp | 7 | ||||
| -rw-r--r-- | indra/newview/llexpandabletextbox.h | 10 | ||||
| -rw-r--r-- | indra/newview/llpanelpicks.cpp | 8 | ||||
| -rw-r--r-- | indra/newview/llviewerwindow.cpp | 22 | ||||
| -rw-r--r-- | indra/newview/skins/default/textures/textures.xml | 3 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_bottomtray.xml | 1 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_pick_list_item.xml | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/widgets/expandable_text.xml | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/widgets/panel.xml | 3 | 
9 files changed, 37 insertions, 21 deletions
| diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index 48b5fc11b7..7bc48185e6 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -51,7 +51,7 @@ public:  	/*virtual*/ void	getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const   	{  		// more label always spans width of text box -		width = mEditor.getTextRect().getWidth();  +		width = mEditor.getTextRect().getWidth() - mEditor.getHPad();   		height = llceil(mStyle->getFont()->getLineHeight());  	}  	/*virtual*/ S32		getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const  @@ -153,6 +153,11 @@ void LLExpandableTextBox::LLTextBoxEx::showExpandText()  {  	if (!mExpanderVisible)  	{ +		// make sure we're scrolled to top when collapsing +		if (mScroller) +		{ +			mScroller->goToTop(); +		}  		// get fully visible lines  		std::pair<S32, S32> visible_lines = getVisibleLines(true);  		S32 last_line = visible_lines.second - 1; diff --git a/indra/newview/llexpandabletextbox.h b/indra/newview/llexpandabletextbox.h index d45527aabb..3fe646c29c 100644 --- a/indra/newview/llexpandabletextbox.h +++ b/indra/newview/llexpandabletextbox.h @@ -69,16 +69,6 @@ protected:  		virtual S32 getVerticalTextDelta();  		/** -		 * Returns text vertical padding -		 */ -		virtual S32 getVPad() { return mVPad; } - -		/** -		 * Returns text horizontal padding -		 */ -		virtual S32 getHPad() { return mHPad; } - -		/**  		 * Shows "More" link  		 */  		void showExpandText(); diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index aa6909560d..6181531f82 100644 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -73,10 +73,10 @@ LLPanelPicks::LLPanelPicks()  	mPopupMenu(NULL),  	mProfilePanel(NULL),  	mPickPanel(NULL), -	mPicksList(NULL) -	, mPanelPickInfo(NULL) -	, mPanelPickEdit(NULL) -	, mOverflowMenu(NULL) +	mPicksList(NULL), +	mPanelPickInfo(NULL), +	mPanelPickEdit(NULL), +	mOverflowMenu(NULL)  {  } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ba32e07464..b574a9c110 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2424,19 +2424,35 @@ void LLViewerWindow::updateUI()  	BOOL handled_by_top_ctrl = FALSE;  	LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl();  	LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture(); +	LLView* captor_view = dynamic_cast<LLView*>(mouse_captor); + +	//FIXME: only include captor and captor's ancestors if mouse is truly over them --RN  	//build set of views containing mouse cursor by traversing UI hierarchy and testing   	//screen rect against mouse cursor  	view_handle_set_t mouse_hover_set; -	// start at current mouse captor (if is a view) or UI root -	LLView* root_view = NULL; -	root_view = dynamic_cast<LLView*>(mouse_captor); +	// constraint mouse enter events to children of mouse captor +	LLView* root_view = captor_view; + +	// if mouse captor doesn't exist or isn't a LLView +	// then allow mouse enter events on entire UI hierarchy  	if (!root_view)  	{  		root_view = mRootView;  	} +	// include all ancestors of captor_view as automatically having mouse +	if (captor_view) +	{ +		LLView* captor_parent_view = captor_view->getParent(); +		while(captor_parent_view) +		{ +			mouse_hover_set.insert(captor_parent_view->getHandle()); +			captor_parent_view = captor_parent_view->getParent(); +		} +	} +  	// aggregate visible views that contain mouse cursor in display order  	// while the top_ctrl contains the mouse cursor, only it and its descendants will receive onMouseEnter events diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 79c70c4d8f..05f7c5205d 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -734,4 +734,7 @@    <texture name="media_panel_bg.png" preload="true" scale_left="9" scale_top="9" scale_right="9" scale_bottom="9" />    <texture name="media_panel_hoverrectangle.png" preload="true" scale_left="9" scale_top="9" scale_right="9" scale_bottom="9" /> +  <texture name="square_btn_32x128.tga" scale_left="2" scale_bottom="2" scale_right="126" scale_top="30"/> +  <texture name="square_btn_selected_32x128.tga" scale_left="2" scale_bottom="2" scale_right="126" scale_top="30"/> +  </textures> diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 9065c6b3e8..73a1bae1c6 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -10,6 +10,7 @@   left="0"   name="bottom_tray"   top="28" + chrome="true"    border_visible="false"   width="1000">      <layout_stack diff --git a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml index 1074dd4627..38ea6b6196 100644 --- a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml @@ -57,7 +57,7 @@       use_ellipses="false"       width="197"       word_wrap="false" /> -    <text +    <expandable_text       follows="top|left|right"       font="SansSerifSmall"       height="40" diff --git a/indra/newview/skins/default/xui/en/widgets/expandable_text.xml b/indra/newview/skins/default/xui/en/widgets/expandable_text.xml index 319beac291..f59c46b2f5 100644 --- a/indra/newview/skins/default/xui/en/widgets/expandable_text.xml +++ b/indra/newview/skins/default/xui/en/widgets/expandable_text.xml @@ -3,7 +3,7 @@   max_height="300" >   <textbox     more_label="More"  -  follows="left|top" +  follows="left|top|right"    name="text"     allow_scroll="true"     use_ellipses="true" diff --git a/indra/newview/skins/default/xui/en/widgets/panel.xml b/indra/newview/skins/default/xui/en/widgets/panel.xml index 1bd5a5bda2..7262c0dc5c 100644 --- a/indra/newview/skins/default/xui/en/widgets/panel.xml +++ b/indra/newview/skins/default/xui/en/widgets/panel.xml @@ -7,4 +7,5 @@  <panel bg_opaque_color="PanelFocusBackgroundColor"         bg_alpha_color="PanelDefaultBackgroundColor"         background_visible="false" -       background_opaque="false"/> +       background_opaque="false" +       chrome="false"/>
\ No newline at end of file | 
