RFR: JDK-8294427 - Check boxes and radio buttons have rendering issues on Windows in High DPI env [v2]
Rajat Mahajan
rmahajan at openjdk.org
Sun May 14 19:40:44 UTC 2023
On Wed, 10 May 2023 17:45:17 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> So, I added this code specifically to have improved rendering for the 25% cases, like 125%, 225%, 325% as rendering was a little off for these scale values and empirically based on what we saw it looked better with this calculation.
>> It is also important to note that windows is not consistent in what size it provides for a part(button) . For example for 150% it provides part size as 20 and we calculate it as 20 in above code. For 175% windows still provides 20 again (while we would expect higher value) and we calculate it as 23 and it works out good. But as I said earlier for 125% or 225% it works best with above code.
>> The 20 vs 19 thing that I mentioned above was to just show that clipRound doesn't calculate it same was as my code and can have rendering repercussions as it is very sensitive to pixel variation , even 1 pixel variation causes rendering artifacts.
>
>>So, I added this code specifically to have improved rendering for the 25% cases, like 125%, 225%, 325% as rendering was a little off f
>
> But why it looks off if the clipRound is used? Does that size scales worse or does it cut the image at some direction?
With clipRound this is what I see with 150% Scaling:

With the current code change this is what I see with 150% Scaling:

I see it scaled down with clipRound.
I think this because of the calculation difference I mentioned above, as this is very sensitive and even 1pixel here or there can cause rendering issues.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13701#discussion_r1193198693
More information about the client-libs-dev
mailing list