<Swing Dev> [9] Review request for 8165594 Bad rendering of Swing UI controls with Windows Classic L&F on HiDPI display
Andrej Golovnin
andrej.golovnin at gmail.com
Fri Sep 16 08:22:54 UTC 2016
Hi Alexandr,
thanks! It looks much better now.
> http://cr.openjdk.java.net/~alexsch/8165594/webrev.01
src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java
490 if(isScaledGraphics){
Spaces are missed between 'if' and '(' and between ')' and '{'.
The empty lines 491, 520 and 522 are not needed and should be removed.
src/java.desktop/share/classes/javax/swing/plaf/basic/BasicArrowButton.java
240 if(SwingUtilities2.isScaledGraphics(g)){
Spaces are missed between 'if' and '(' and between ')' and '{'.
344 xPoints = new int[]{mid, mid + size, mid - size};
The Java Style Guidelines [1] don't mention this. But I think there
should be a space between 'new int[]' and '{'. The lines 345, 356,
357, 366 and 367 are also affected.
src/java.desktop/share/classes/sun/swing/SwingUtilities2.java
2041 public static boolean isScaledGraphics(Graphics g) {
Have you considered to make this method a public API (move to the
SwingUtilities class), so that other Swing developers may use it too?
> [2]
> http://cr.openjdk.java.net/~alexsch/8165594/screenshots/icons-windows-classic-2x_01.png
> [3]
> http://cr.openjdk.java.net/~alexsch/8165594/screenshots/icons-windows-classic-4x_01.png
Radio buttons are still not ideal. Have you considered to enable AA
when painting HiDPI icons? On the other hand I'm not sure, whether we
should invest a lot of time into making Windows Classic L&f to look
perfect on HiDPI screens.
Best regards,
Andrej Golovnin
[1] http://cr.openjdk.java.net/~alundblad/styleguide/
More information about the swing-dev
mailing list