From 552ddf4be4a5b906fb65b477cfba68da54bb8ec2 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Wed, 24 Nov 2010 18:56:21 +0200 Subject: 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. --- indra/llui/llmenubutton.cpp | 7 +++++++ indra/llui/llmenubutton.h | 1 + 2 files changed, 8 insertions(+) (limited to 'indra/llui') 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; -- cgit v1.2.3