diff options
-rw-r--r-- | indra/llui/llmenugl.cpp | 33 | ||||
-rw-r--r-- | indra/newview/llpreviewtexture.cpp | 10 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/favorites_bar_button.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_preview_texture.xml | 6 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_navigation_bar.xml | 2 |
5 files changed, 36 insertions, 17 deletions
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); diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 26368fb0a8..a857e30d4f 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -419,12 +419,10 @@ void LLPreviewTexture::updateDimensions() view_height += info_height; S32 button_height = 0; - if (mShowKeepDiscard || mCopyToInv) { //mCopyToInvBtn - - // add space for buttons - view_height += (BTN_HEIGHT + CLIENT_RECT_VPAD) * 3; - button_height = (BTN_HEIGHT + PREVIEW_PAD) * 3; - } + + // add space for buttons + view_height += (BTN_HEIGHT + CLIENT_RECT_VPAD) * 3; + button_height = (BTN_HEIGHT + PREVIEW_PAD) * 3; view_width = llmax(view_width, getMinWidth()); view_height = llmax(view_height, getMinHeight()); diff --git a/indra/newview/skins/default/xui/en/favorites_bar_button.xml b/indra/newview/skins/default/xui/en/favorites_bar_button.xml index 361f5a7bc8..d7f8114c34 100644 --- a/indra/newview/skins/default/xui/en/favorites_bar_button.xml +++ b/indra/newview/skins/default/xui/en/favorites_bar_button.xml @@ -18,6 +18,8 @@ left="0" name="favorites_bar_btn" tab_stop="false" + pad_right="10" + pad_left="10" top="0" use_ellipses="true" width="120" /> diff --git a/indra/newview/skins/default/xui/en/floater_preview_texture.xml b/indra/newview/skins/default/xui/en/floater_preview_texture.xml index 552902d1d9..0d155fb01e 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_texture.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_texture.xml @@ -64,7 +64,7 @@ height="16" layout="topleft" left_delta="-110" - name="dimensions" + name="aspect_ratio" top_pad="5" width="200"> Preview aspect ratio @@ -112,7 +112,7 @@ label="OK" layout="topleft" left="6" - name="keep" + name="Keep" top_pad="5" width="100" /> <button @@ -121,7 +121,7 @@ label="Cancel" layout="topleft" left_pad="5" - name="discard" + name="Discard" top_delta="0" width="100" /> <button diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml index 74265a51ca..4d814a4d52 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -149,7 +149,7 @@ <favorites_bar follows="left|right|top" - font="SansSerif" + font="SansSerifSmall" height="15" layout="topleft" left="0" |