From ab93c0ffb5f7601a7baee770f904537981be431a Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 17 Dec 2009 16:15:46 -0800 Subject: EXT-3534 Default Location Obscures the Top of an Open Notecard When Nav and/or Favorites Bar are Hidden EXT-3334 [BSI] Chat/IM log preferences not retained EXT-3402 Replace "X" for checked menu items with a check mark glyph [Patch Included] reviewed by richard --- indra/llui/llmenugl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llmenugl.cpp') diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index fd5c2b7fef..c42ae040d6 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -97,7 +97,7 @@ const U32 SEPARATOR_HEIGHT_PIXELS = 8; const S32 TEAROFF_SEPARATOR_HEIGHT_PIXELS = 10; const S32 MENU_ITEM_PADDING = 4; -const std::string BOOLEAN_TRUE_PREFIX( "X" ); +const std::string BOOLEAN_TRUE_PREFIX( "\xE2\x9C\x94" ); // U+2714 HEAVY CHECK MARK const std::string BRANCH_SUFFIX( ">" ); const std::string ARROW_UP ("^^^^^^^"); const std::string ARROW_DOWN("vvvvvvv"); -- cgit v1.2.3 From 7cf60a0d57ef8a483f637341665a1765172721d5 Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Fri, 18 Dec 2009 16:44:16 +0200 Subject: Fixed normal bug EXT - 2863 ([BSI] Group Chat List Names right click do not contain view profile or send private message) --HG-- branch : product-engine --- indra/llui/llmenugl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llmenugl.cpp') diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index fd5c2b7fef..e7b2e8476b 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -3905,7 +3905,7 @@ BOOL LLContextMenu::appendContextSubMenu(LLContextMenu *menu) item = LLUICtrlFactory::create(p); LLMenuGL::sMenuContainer->addChild(item->getBranch()); - item->setFont( LLFontGL::getFontSansSerifSmall() ); + item->setFont( LLFontGL::getFontSansSerif() ); return append( item ); } -- cgit v1.2.3 From dafd9e269f8f743f2168e015c8efccedc662bba0 Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Fri, 25 Dec 2009 17:18:51 +0200 Subject: Fixed a memory leak in ContextMenu (EXT-3563). --HG-- branch : product-engine --- indra/llui/llmenugl.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/llui/llmenugl.cpp') diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 202ed04fbc..60ef01074b 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -3610,6 +3610,11 @@ public: LLContextMenuBranch(const Params&); + virtual ~LLContextMenuBranch() + { + delete mBranch; + } + // called to rebuild the draw label virtual void buildDrawLabel( void ); -- cgit v1.2.3 From 8e5b453ea05ca3d53997b1fc2f0f4fcf65de9857 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 29 Dec 2009 16:12:12 -0800 Subject: EXT-3589 Favorites Appear Squished Together on Left Half of Favorites Bar EXT-3602 Inventory > New Clothes sub menu not aligned EXT-3631 Texture preview after upload > Image covers buttons reviewed by James --- indra/llui/llmenugl.cpp | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) (limited to 'indra/llui/llmenugl.cpp') diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 60ef01074b..2648cbf08d 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -23,7 +23,7 @@ * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, * and agree to abide by those obligations. - * + * * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, * COMPLETENESS OR PERFORMANCE. @@ -1208,22 +1208,41 @@ void LLMenuItemBranchGL::openMenu() branch->arrange(); - LLRect rect = branch->getRect(); + LLRect branch_rect = branch->getRect(); // calculate root-view relative position for branch menu S32 left = getRect().mRight; S32 top = getRect().mTop - getRect().mBottom; localPointToOtherView(left, top, &left, &top, branch->getParent()); - rect.setLeftTopAndSize( left, top, - rect.getWidth(), rect.getHeight() ); + branch_rect.setLeftTopAndSize( left, top, + branch_rect.getWidth(), branch_rect.getHeight() ); if (branch->getCanTearOff()) { - rect.translate(0, TEAROFF_SEPARATOR_HEIGHT_PIXELS); + branch_rect.translate(0, TEAROFF_SEPARATOR_HEIGHT_PIXELS); + } + branch->setRect( branch_rect ); + + // if branch extends outside of menu region change the direction it opens in + S32 x, y; + S32 delta_x = 0; + S32 delta_y = 0; + branch->localPointToOtherView( 0, 0, &x, &y, branch->getParent() ); + if( y < menu_region_rect.mBottom ) + { + // open upwards if menu extends past bottom + // adjust by the height of the menu item branch since it is a submenu + delta_y = branch_rect.getHeight() - getRect().getHeight(); } - branch->setRect( rect ); - branch->translateIntoRectWithExclusion( menu_region_rect, getMenu()->getRect(), FALSE ); + + if( x + branch_rect.getWidth() > menu_region_rect.mRight ) + { + // move sub-menu over to left side + delta_x = llmax(-x, ( -(branch_rect.getWidth() + getRect().getWidth()))); + } + branch->translate( delta_x, delta_y ); + branch->setVisible( TRUE ); branch->getParent()->sendChildToFront(branch); -- cgit v1.2.3