First of all, the renderScale properties do in fact work. I had not experimented with this feature before writing the post, and it turns out I was a bit premature. See Windows GUI DPI Scaling in 2018 for details. There’s a new layout bug in JavaFX 9 that may cause truncated controls labels in simple windows. I’m not sure if the mentioned flag -Dprism.order=sw to force software rendering still works, but so far I haven’t seen anything to the contrary. Very good news! Some older blog posts I wrote on these subjects are now happily obsolete, namely JavaFX GUI Scaling at 120-144 DPI and parts of JavaFX and JAVA_TOOL_OPTIONS. Unrelated to the linked bug, the min/maxWidth and min/maxHeight properties of the Stage class are now correctly DPI-scaled, so you can properly use them to restrict window resizing.Note - This feature is unfortunately less useful than I had hoped for. (The similar glass.win startup flags were removed, as noted in the entry for ). Even better, the Window class got writable scaling properties ( renderScaleX/Y, forceIntegerRenderScale) so you can override DPI scaling on a per-window basis.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |