Author: noelgrandin
Date: Thu Oct 27 08:31:36 2011
New Revision: 1189669
URL: http://svn.apache.org/viewvc?rev=1189669&view=rev
Log:
add comments
Modified:
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraMenuButtonSkin.java
Modified:
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraMenuButtonSkin.java
URL:
http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraMenuButtonSkin.java?rev=1189669&r1=1189668&r2=1189669&view=diff
==============================================================================
---
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraMenuButtonSkin.java
(original)
+++
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraMenuButtonSkin.java
Thu Oct 27 08:31:36 2011
@@ -79,6 +79,9 @@ public class TerraMenuButtonSkin extends
int width = getWidth();
window.setMinimumWidth(width - TRIGGER_WIDTH - 1);
+ // If the popup extends over the right edge of the display,
+ // move it so that the right edge of the popup lines up with the
+ // right edge of the button
int popupWidth = window.getPreferredWidth();
if (buttonLocation.x + popupWidth > displaySize.width) {
window.setX(buttonLocation.x + width - popupWidth);