RFR: 8318577: Windows Look-and-Feel JProgressBarUI does not render correctly on 2x UI scale [v2]

Tejesh R tr at openjdk.org
Fri Jan 24 06:30:55 UTC 2025


On Wed, 22 Jan 2025 07:02:21 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> JProgressBar (StringPainted variant) does not render consistently on HiDPI displays (e.g. 200% Scale Factor) on Windows (using Windows Look-and-Feel) depending on the height at which JProgressBar is rendered, in which case the gap between progressbar and skin is different for different height as can be seen below
>> 
>> ![image](https://github.com/user-attachments/assets/5552ba7d-f747-4037-9db0-e1554f8b35d9)
>> 
>> Native windows progressbar renders without leaving any gap as can be seen here
>> 
>> ![image](https://github.com/user-attachments/assets/672a5810-1c44-4c22-aef2-93abde536bca)
>> 
>> so the padding is removed to render the progressbar similar to windows native and it is rendered properly
>> 
>> ![image](https://github.com/user-attachments/assets/ecb25140-8df2-47e2-bde5-925eb031bedb)
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   summary update

I have a couple of observations here.
1. The suggested solution removes the gap completely as referenced from Windows OS progress bar, yet the border line is not visible which is grey in color.
2. If you can observe the "BAD" progress bar, the bottom border is visible, where as its not in "GOOD" progress bar. It's like the whole paint is shifted by pixel to top. 
3. Probably the issue of rounding-off still exists, if we address this issue then the gap offset might get corrected (Not 100% sure though).

-------------

PR Review: https://git.openjdk.org/jdk/pull/23227#pullrequestreview-2571740262


More information about the client-libs-dev mailing list