On Mon, 8 May 2023 18:30:36 GMT, Rajat Mahajan <[email protected]> wrote:

> What is GC ?

I guess Graphics Configuration.

> Then that layout code will be broken if layout will be calculated on already 
> visible component, I guess it should take into account the GC where the 
> component is located.

It works fine to the best of Rajat's and my testing because the layout doesn't 
change. The “icons” don't scale progressively, Windows returns the same size 
for many DPI values, Swing scales the pixels up, this fact is taken into 
account when rendering the theme image to avoid additional transformations.

Changing the preferred size dynamically based on the current DPI of the monitor 
could be a better way in the long term. Dropping `CachedPainter` from the 
DPI-aware rendering path of the themes is also on the table.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13701#discussion_r1187767163

Reply via email to