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

Prasanta Sadhukhan psadhukhan at openjdk.org
Wed Jan 22 04:04:17 UTC 2025


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)

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

Commit messages:
 - jcheck
 - jcheck
 - 8318577: Windows Look-and-Feel JProgressBarUI does not render correctly on 2x UI scale

Changes: https://git.openjdk.org/jdk/pull/23227/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23227&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8318577
  Stats: 102 lines in 2 files changed: 97 ins; 2 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/23227.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23227/head:pull/23227

PR: https://git.openjdk.org/jdk/pull/23227


More information about the client-libs-dev mailing list