<Swing Dev> [9] Review Request: 8073795 JMenuBar looks bad under retina
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Wed Feb 25 14:21:36 UTC 2015
Hello.
Please review the fix for jdk 9.
Two issues were fixed:
- The problem was described in the JDK-8032219, most of the swing
components draw a border using drawLine, with assumption that it will be
scaled in the same way as filleRect, this is incorrect. Code now use
SwingUtilities2.drawHLine();
- The JMenuBar draws its border out of bounds, because it uses width
as a line length instead of width - 1.
It seems that we should update all our components at some point.
Obsolete comments in AquaMenuBarBorder were removed since they just not
full version of the parent comments.
The test is tricky. I draw JMenuBar two times, and in the second time I
draw a border on top of it, with assumption that this shouldn't
clear/change JMenu items in the menubar(this is true for a standard L&F's).
Bug: https://bugs.openjdk.java.net/browse/JDK-8073795
Webrev can be found at: http://cr.openjdk.java.net/~serb/8073795/webrev.01
--
Best regards, Sergey.
More information about the swing-dev
mailing list