summaryrefslogtreecommitdiff
path: root/indra/llui/llmenubutton.cpp
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2010-11-24 18:56:21 +0200
committerVadim ProductEngine <vsavchuk@productengine.com>2010-11-24 18:56:21 +0200
commit552ddf4be4a5b906fb65b477cfba68da54bb8ec2 (patch)
tree3d250ecb1661a5a5c543ccd20ae2516228f42b99 /indra/llui/llmenubutton.cpp
parentd7d23d16246e182c1cc74a57cac357aaa5c6c8e2 (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/llmenubutton.cpp')
-rw-r--r--indra/llui/llmenubutton.cpp7
1 files changed, 7 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;