diff options
| author | Vadim ProductEngine <vsavchuk@productengine.com> | 2010-11-24 18:56:21 +0200 | 
|---|---|---|
| committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2010-11-24 18:56:21 +0200 | 
| commit | 552ddf4be4a5b906fb65b477cfba68da54bb8ec2 (patch) | |
| tree | 3d250ecb1661a5a5c543ccd20ae2516228f42b99 /indra/llui | |
| parent | d7d23d16246e182c1cc74a57cac357aaa5c6c8e2 (diff) | |
STORM-666 FIXED Menu spawned by the overflow button had invalid position in Place Profile and Avatar Profile panels.
Changes:
* Changed the button class from LLButton to LLMenuButton to avoid duplicating menu positioning logic.
* Enabled LLMenuButton to support aligning menu to the top right corner of the button.
Diffstat (limited to 'indra/llui')
| -rw-r--r-- | indra/llui/llmenubutton.cpp | 7 | ||||
| -rw-r--r-- | indra/llui/llmenubutton.h | 1 | 
2 files changed, 8 insertions, 0 deletions
| diff --git a/indra/llui/llmenubutton.cpp b/indra/llui/llmenubutton.cpp index ac568a83e4..eed0085273 100644 --- a/indra/llui/llmenubutton.cpp +++ b/indra/llui/llmenubutton.cpp @@ -175,6 +175,13 @@ void LLMenuButton::updateMenuOrigin()  			mY = rect.mTop + mMenuHandle.get()->getRect().getHeight();  			break;  		} +		case MP_TOP_RIGHT: +		{ +			const LLRect& menu_rect = mMenuHandle.get()->getRect(); +			mX = rect.mRight - menu_rect.getWidth(); +			mY = rect.mTop + menu_rect.getHeight(); +			break; +		}  		case MP_BOTTOM_LEFT:  		{  			mX = rect.mLeft; diff --git a/indra/llui/llmenubutton.h b/indra/llui/llmenubutton.h index 9e91b9e99d..7b657595da 100644 --- a/indra/llui/llmenubutton.h +++ b/indra/llui/llmenubutton.h @@ -47,6 +47,7 @@ public:  	typedef enum e_menu_position  	{  		MP_TOP_LEFT, +		MP_TOP_RIGHT,  		MP_BOTTOM_LEFT  	} EMenuPosition; | 
