I don't see any issues with scaling. Component size calculation shouldn't depend on scaling (it produces the same size at any scale).

The only issue I found with 125% and 150% scale is the drop-down popup location which is shifted by several pixels from the correct position. But this issue was not introduced by JDK-6490753 and it is unrelated to the current fix.

As for the magic numbers... I did not change a lot here. This style took place before the fix and it is used in other LnF classes. Do you want me to replace those numbers with constants?

--Semyon

On 04/25/2017 05:32 PM, Philip Race wrote:
Lots of magic numbers .. was it always like this ?

Can you test in JDK9's version of SwingSet2 with both Windows Style L&F and Windows Classic L&F at 100%, 125%, and 150% and compare with native comboboxes at the same time.

Although I don't like the magic numbers if these all match then it will probably be OK.

-phil.

On 4/25/17, 8:55 AM, Semyon Sadetsky wrote:
Hello,

Please review fix for JDK9:

bug: https://bugs.openjdk.java.net/browse/JDK-8179027

webrev: http://cr.openjdk.java.net/~ssadetsky/8179027/webrev.00/

This a regression introduced by JDK-6490753. The updated JComboBox look and feel affected JComboBox preferred size calculation. In the fix the size calculation was updated to fit the new L&F.

--Semyon



Reply via email to