# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: /Users/catlan/Projekte/netbeans/core/swing/plaf/src/org/netbeans/swing/plaf/aqua # This patch can be applied using context Tools: Patch action on respective folder. # Above lines and this line are ignored by the patching process. Index: AquaSeparatorUI.java *** /Users/catlan/Projekte/netbeans/core/swing/plaf/src/org/netbeans/swing/plaf/aqua/AquaSeparatorUI.java --- /Users/catlan/Projekte/netbeans/core/swing/plaf/src/org/netbeans/swing/plaf/aqua/AquaSeparatorUI.java *************** *** 18,43 **** package org.netbeans.swing.plaf.aqua; ! import javax.swing.*; import javax.swing.plaf.ComponentUI; import javax.swing.plaf.SeparatorUI; - import java.awt.*; /** ! Aqua separators calculate height based on the system font size, ! * resulting in huge white spaces in menus. * ! * @author Tim Boudreau */ public class AquaSeparatorUI extends SeparatorUI { private static ComponentUI separatorui = new AquaSeparatorUI(); public static ComponentUI createUI(JComponent c) { return separatorui; ! } public Dimension getPreferredSize(JComponent c) { ! return new Dimension (10, 4); } } --- 18,68 ---- package org.netbeans.swing.plaf.aqua; ! import java.awt.Color; ! import java.awt.Dimension; ! import java.awt.Graphics; ! import javax.swing.JComponent; ! import javax.swing.JPopupMenu; import javax.swing.plaf.ComponentUI; import javax.swing.plaf.SeparatorUI; /** ! * Aqua SeparatorUI in JPopupMenu has a height of 12px. The line has a ! * padding-left and padding-right of 1px. And the line is draw at px 6. * ! * Only JPopupMenu Separator get draw, all other are 0x0 px. ! * ! * @author Christopher Atlan */ public class AquaSeparatorUI extends SeparatorUI { + private final static Color lineColor = new Color(215, 215, 215); private static ComponentUI separatorui = new AquaSeparatorUI(); public static ComponentUI createUI(JComponent c) { return separatorui; ! } ! ! public void paint( Graphics g, JComponent c ) { ! if (c.getParent() instanceof JPopupMenu) { ! Dimension s = c.getSize(); ! ! g.setColor(lineColor); ! g.drawLine(1, 5, s.width - 2, 5); ! } ! } public Dimension getPreferredSize(JComponent c) { ! Dimension s; ! if (c.getParent() instanceof JPopupMenu) { ! return new Dimension( 0, 12 ); ! } else { ! s = new Dimension (0, 0); ! } ! ! return s; } + + public Dimension getMinimumSize( JComponent c ) { return null; } + public Dimension getMaximumSize( JComponent c ) { return null; } } Index: AquaLFCustoms.java *** /Users/catlan/Projekte/netbeans/core/swing/plaf/src/org/netbeans/swing/plaf/aqua/AquaLFCustoms.java --- /Users/catlan/Projekte/netbeans/core/swing/plaf/src/org/netbeans/swing/plaf/aqua/AquaLFCustoms.java *************** *** 51,52 **** --- 51,57 ---- "ComboBox.font", controlFont, "PopupMenuSeparatorUI", "org.netbeans.swing.plaf.aqua.AquaSeparatorUI", "SeparatorUI", "org.netbeans.swing.plaf.aqua.AquaSeparatorUI", + "PopupMenu.border", BorderFactory.createEmptyBorder(4, 0, 4, 0), SLIDING_BUTTON_UI, "org.netbeans.swing.tabcontrol.plaf.AquaSlidingButtonUI", EDITOR_ERRORSTRIPE_SCROLLBAR_INSETS, new Insets(18, 0, 18, 0), *************** *** 61,62 **** --- 62,68 ---- "controlFont", new GuaranteedValue (new String[] {"Label.font", "Tree.font"}, new FontUIResource("Dialog", Font.PLAIN, 14)).getFont(), "PopupMenuSeparatorUI", "org.netbeans.swing.plaf.aqua.AquaSeparatorUI", "SeparatorUI", "org.netbeans.swing.plaf.aqua.AquaSeparatorUI", + "PopupMenu.border", BorderFactory.createEmptyBorder(4, 0, 4, 0), SLIDING_BUTTON_UI, "org.netbeans.swing.tabcontrol.plaf.AquaSlidingButtonUI", EDITOR_ERRORSTRIPE_SCROLLBAR_INSETS, new Insets(18, 0, 18, 0),