You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/09/20 20:12:30 UTC

[GitHub] matthiasblaesing closed pull request #876: [NETBEANS-1249] Remove excessive spacing between menu items (Windows)

matthiasblaesing closed pull request #876: [NETBEANS-1249] Remove excessive spacing between menu items (Windows)
URL: https://github.com/apache/incubator-netbeans/pull/876
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/platform/o.n.swing.plaf/src/org/netbeans/swing/plaf/windows8/Windows8LFCustoms.java b/platform/o.n.swing.plaf/src/org/netbeans/swing/plaf/windows8/Windows8LFCustoms.java
index a5c45c95e8..9e5b0982a6 100644
--- a/platform/o.n.swing.plaf/src/org/netbeans/swing/plaf/windows8/Windows8LFCustoms.java
+++ b/platform/o.n.swing.plaf/src/org/netbeans/swing/plaf/windows8/Windows8LFCustoms.java
@@ -69,8 +69,22 @@
             "TextArea.font", new GuaranteedValue ("Label.font", new Font("Dialog", Font.PLAIN, fontsize)),
 
             EDITOR_ERRORSTRIPE_SCROLLBAR_INSETS, new Insets(17, 0, 17, 0),
+
+            /* NETBEANS-1249: Remove excessive spacing between menu items, which appeared going from
+                              Java 8 to Java 9. See screeshots in the JIRA ticket. The spacing
+                              appeared during the fix for JDK-8067346; it should be safe to set
+                              top/bottom margins to zero, however, like they were before. See
+                              http://hg.openjdk.java.net/jdk10/master/annotate/be620a591379/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java .
+                              Current Swing defaults are [2,2,2,2] for all of these (set in
+                              javax.swing.plaf.basic.BasicLookAndFeel). */
+            "Menu.margin", new Insets(0, 2, 0, 2),
+            "MenuItem.margin", new Insets(0, 2, 0, 2),
+            "CheckBoxMenuItem.margin", new Insets(0, 2, 0, 2),
+            "RadioButtonMenuItem.margin", new Insets(0, 2, 0, 2),
+            /* Note that menu separators are still 3 pixels too tall on Windows compared to native
+            apps. Fixing that would be a bigger job, though (replacing WindowsPopupMenuSeparatorUI
+            to override getPreferredSize). */
         };
-        
         return result;
     }
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists