On Mon, 8 May 2023 18:41:45 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:
>> What is GC ? > >> 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. We already changed the preferred size dynamically for most of the components, since the size depends on the fonts and the fonts depends on the GC, see: https://hg.openjdk.org/jdk/jdk11/rev/55a43beaa529 https://hg.openjdk.org/jdk/jdk/rev/ea50ef230511 https://github.com/openjdk/jdk/commit/11aadc9d98d364b91114c028c7e2eff8de2f2bf0 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13701#discussion_r1187985627