2005-09-22  Lillian Angel  <[EMAIL PROTECTED]>

        * javax/swing/JPopupMenu.java
        (setVisible): Size of menu should always be the preferred
        size. It was sometimes cutting of the accelerator.
        * javax/swing/plaf/basic/BasicMenuItemUI.java:
        Increased defaultAcceleratorLabelGap field to 10, to
        make menuItem more readable.

Index: javax/swing/JPopupMenu.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JPopupMenu.java,v
retrieving revision 1.23
diff -u -r1.23 JPopupMenu.java
--- javax/swing/JPopupMenu.java	20 Sep 2005 22:00:54 -0000	1.23
+++ javax/swing/JPopupMenu.java	22 Sep 2005 19:04:18 -0000
@@ -564,13 +564,7 @@
             Dimension screenSize = getToolkit().getScreenSize();
             
             boolean fit = true;
-            Dimension size;
-
-            // Determine the size of the popup menu
-            if (this.getSize().width == 0 && this.getSize().width == 0)
-              size = this.getPreferredSize();
-            else
-              size = this.getSize();
+            Dimension size = this.getPreferredSize();
 
             if ((size.width > (rootContainer.getWidth() - popupLocation.x))
                 || (size.height > (rootContainer.getHeight() - popupLocation.y)))
Index: javax/swing/plaf/basic/BasicMenuItemUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicMenuItemUI.java,v
retrieving revision 1.24
diff -u -r1.24 BasicMenuItemUI.java
--- javax/swing/plaf/basic/BasicMenuItemUI.java	17 Sep 2005 21:01:23 -0000	1.24
+++ javax/swing/plaf/basic/BasicMenuItemUI.java	22 Sep 2005 19:04:18 -0000
@@ -163,7 +163,7 @@
   /**
    * Number of spaces between accelerator and menu item's label.
    */
-  private int defaultAcceleratorLabelGap = 4;
+  private int defaultAcceleratorLabelGap = 10;

_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to