[ https://issues.apache.org/jira/browse/PIVOT-990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16188457#comment-16188457 ]
Roger Whitcomb commented on PIVOT-990: -------------------------------------- New fix that seems to work well in all cases: {quote}Index: wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraMenuPopupSkin.java =================================================================== --- wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraMenuPopupSkin.java (revision 1809109) +++ wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraMenuPopupSkin.java (working copy) @@ -63,7 +63,7 @@ border.setPreferredWidth(displayWidth); x = 0; } else if (x + size.width > displayWidth) { - x -= size.width; + x = Math.max(displayWidth - size.width, 0); } int y = location.y; @@ -72,7 +72,7 @@ border.setPreferredHeight(displayHeight); y = 0; } else if (y + size.height > displayHeight) { - y -= size.height; + y = Math.max(displayHeight - size.height, 0); } menuPopup.setLocation(x, y); {quote} > MenuPopup can overflow off the top of the window > ------------------------------------------------ > > Key: PIVOT-990 > URL: https://issues.apache.org/jira/browse/PIVOT-990 > Project: Pivot > Issue Type: Bug > Components: wtk-terra > Affects Versions: 2.0.4, 2.1 > Environment: All > Reporter: Roger Whitcomb > Assignee: Roger Whitcomb > Priority: Minor > Fix For: 2.1, 2.0.5 > > Attachments: 990.patch, menu2.png, menu_popup_cut_off.png, > menu_popup_fixed.png > > > If the window / display size is small (either height [usually] or width), a > tall or wide MenuPopup will be positioned either off the top or off the left > of the window and you cannot see the top/left of the menu. This is > particularly a problem with the height because you cannot see the menu items > that are positioned outside the window, and so you cannot properly select > them. > The solution is to limit the border size in these cases, so that the Panorama > that surrounds the menu list will automatically come into play and allow the > menu to be scrolled into view. -- This message was sent by Atlassian JIRA (v6.4.14#64029)