You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by rw...@apache.org on 2013/11/05 01:21:47 UTC

svn commit: r1538841 - in /pivot/trunk: ./ wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraMenuPopupSkin.java

Author: rwhitcomb
Date: Tue Nov  5 00:21:46 2013
New Revision: 1538841

URL: http://svn.apache.org/r1538841
Log:
PIVOT-928: Always position popup menus so they stay within the screen bounds.
The existing code only did it for "context" menus, which meant that second-level
context menus (which aren't marked as such) could still stray outside the bounds.

This change means all popup menus (which could include regular menus as well as
context menus) will get positioned inside the screen bounds.

This is a merge of revision 1538840 from branches/2.0.x to trunk.


Modified:
    pivot/trunk/   (props changed)
    pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraMenuPopupSkin.java

Propchange: pivot/trunk/
------------------------------------------------------------------------------
  Merged /pivot/branches/2.0.x:r1538840

Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraMenuPopupSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraMenuPopupSkin.java?rev=1538841&r1=1538840&r2=1538841&view=diff
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraMenuPopupSkin.java (original)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraMenuPopupSkin.java Tue Nov  5 00:21:46 2013
@@ -232,9 +232,8 @@ public class TerraMenuPopupSkin extends 
 
         panorama.setScrollTop(0);
 
-        if (menuPopup.isContextMenu()) {
-            ApplicationContext.queueCallback(new RepositionCallback());
-        }
+        // Always ensure that the menu popup fits on the display.
+        ApplicationContext.queueCallback(new RepositionCallback());
     }
 
     @Override