Re: [9] Review request: 8091832: Provide API for getting the Screen scale on HiDPI screens
Updated again with the following additions: http://cr.openjdk.java.net/~flar/JDK-8091832/webrev.rt.03/ - Switch to using USER_DEFAULT_SCREEN_DPI pre-defined constant instead of hard-coded 96's - Added @Ignore to failing test RT32570Test.java, to be fixed under JDK-8153542 ...jim On 3/31/16 12:52 AM, Jim Graham wrote: I've updated the fix with the following additions: http://cr.openjdk.java.net/~flar/JDK-8091832/webrev.rt.02/ - Redundant or obsolete command line overrides removed from Windows code as follows: Settings still supported: -Dglass.win.uiScale Settings no longer supported, implementation conflicts with Per-Monitor DPI support: -Dglass.win.minHiDPI Settings no longer supported, replaced by API in FX classes: -Dglass.win.renderScale -Dglass.win.forceIntegerRenderScale - Font size now scales with uiScale override on Windows - Fixes to scaling in JFXPanel - Fixes to scaling in SwingPanel - Monocle Screen initialization fixed Note that SwingNode does not seem to relay the FX scaling parameters to Swing correctly, but that was true before these fixes. This patch will keep the functionality roughly the same, but additional fixes are needed to do proper scaling of embedded Swing nodes. I looked at what was needed and have an idea of what the fix would involve, but decided that it was outside the scope of these fixes that are needed to get the HiDPI FX properties implemented. ...jim On 3/28/16 6:25 PM, Jim Graham wrote: bug: https://bugs.openjdk.java.net/browse/JDK-8091832 webrev: http://cr.openjdk.java.net/~flar/JDK-8091832/webrev.rt.00/ This webrev fixes pixel snapping and application control over pixel scaling on HiDPI screens: - snap*() methods are all updated to take the current scale into account - new variants of snap*() methods are added for separate X/Y control: Added: Region.snapSpaceX/Y() Added: Region.snapSizeX/Y() Added: Region.snapPositionX/Y() - the non-X/Y variants of the above methods are now deprecated: Deprecated: Region.snapSpace() Deprecated: Region.snapSize() Deprecated: Region.snapPosition() - methods to query the scale values of Screen objects: Added: Screen.getOutputScaleX/Y() - properties to query and/or modify the scale values of Window objects: Added Read-Only DoubleProperty: Window.getOutputScaleX/Y() Added Read-Write BooleanProperty: Window.set/getForceIntegerRenderScale() Added Read-Write DoubleProperty: Window.set/getRenderScaleX/Y() The changes have been compiled and tested on Windows and Mac and there were trivial changes needed to the Linux files to adapt to one new method signature, but I haven't done the test build on Linux yet... ...jim
Re: [9] Review request: 8091832: Provide API for getting the Screen scale on HiDPI screens
I've updated the fix with the following additions: http://cr.openjdk.java.net/~flar/JDK-8091832/webrev.rt.02/ - Redundant or obsolete command line overrides removed from Windows code as follows: Settings still supported: -Dglass.win.uiScale Settings no longer supported, implementation conflicts with Per-Monitor DPI support: -Dglass.win.minHiDPI Settings no longer supported, replaced by API in FX classes: -Dglass.win.renderScale -Dglass.win.forceIntegerRenderScale - Font size now scales with uiScale override on Windows - Fixes to scaling in JFXPanel - Fixes to scaling in SwingPanel - Monocle Screen initialization fixed Note that SwingNode does not seem to relay the FX scaling parameters to Swing correctly, but that was true before these fixes. This patch will keep the functionality roughly the same, but additional fixes are needed to do proper scaling of embedded Swing nodes. I looked at what was needed and have an idea of what the fix would involve, but decided that it was outside the scope of these fixes that are needed to get the HiDPI FX properties implemented. ...jim On 3/28/16 6:25 PM, Jim Graham wrote: bug: https://bugs.openjdk.java.net/browse/JDK-8091832 webrev: http://cr.openjdk.java.net/~flar/JDK-8091832/webrev.rt.00/ This webrev fixes pixel snapping and application control over pixel scaling on HiDPI screens: - snap*() methods are all updated to take the current scale into account - new variants of snap*() methods are added for separate X/Y control: Added: Region.snapSpaceX/Y() Added: Region.snapSizeX/Y() Added: Region.snapPositionX/Y() - the non-X/Y variants of the above methods are now deprecated: Deprecated: Region.snapSpace() Deprecated: Region.snapSize() Deprecated: Region.snapPosition() - methods to query the scale values of Screen objects: Added: Screen.getOutputScaleX/Y() - properties to query and/or modify the scale values of Window objects: Added Read-Only DoubleProperty: Window.getOutputScaleX/Y() Added Read-Write BooleanProperty: Window.set/getForceIntegerRenderScale() Added Read-Write DoubleProperty: Window.set/getRenderScaleX/Y() The changes have been compiled and tested on Windows and Mac and there were trivial changes needed to the Linux files to adapt to one new method signature, but I haven't done the test build on Linux yet... ...jim
Re: [9] Review request: 8091832: Provide API for getting the Screen scale on HiDPI screens
Windows provides separate values for the X & Y direction. All of their system APIs that deal with screen and window resolutions provide both values... ...jim On 3/30/2016 12:12 AM, Dr. Michael Paus wrote: Hi, I'd like to know on which systems this distinction between X- and Y-direction is actually relevant. I've never seen such a system before. Michael Am 29.03.16 um 03:25 schrieb Jim Graham: bug: https://bugs.openjdk.java.net/browse/JDK-8091832 webrev: http://cr.openjdk.java.net/~flar/JDK-8091832/webrev.rt.00/ This webrev fixes pixel snapping and application control over pixel scaling on HiDPI screens: - snap*() methods are all updated to take the current scale into account - new variants of snap*() methods are added for separate X/Y control: Added: Region.snapSpaceX/Y() Added: Region.snapSizeX/Y() Added: Region.snapPositionX/Y() - the non-X/Y variants of the above methods are now deprecated: Deprecated: Region.snapSpace() Deprecated: Region.snapSize() Deprecated: Region.snapPosition() - methods to query the scale values of Screen objects: Added: Screen.getOutputScaleX/Y() - properties to query and/or modify the scale values of Window objects: Added Read-Only DoubleProperty: Window.getOutputScaleX/Y() Added Read-Write BooleanProperty: Window.set/getForceIntegerRenderScale() Added Read-Write DoubleProperty: Window.set/getRenderScaleX/Y() The changes have been compiled and tested on Windows and Mac and there were trivial changes needed to the Linux files to adapt to one new method signature, but I haven't done the test build on Linux yet... ...jim
Re: [9] Review request: 8091832: Provide API for getting the Screen scale on HiDPI screens
Hi, I'd like to know on which systems this distinction between X- and Y-direction is actually relevant. I've never seen such a system before. Michael Am 29.03.16 um 03:25 schrieb Jim Graham: bug: https://bugs.openjdk.java.net/browse/JDK-8091832 webrev: http://cr.openjdk.java.net/~flar/JDK-8091832/webrev.rt.00/ This webrev fixes pixel snapping and application control over pixel scaling on HiDPI screens: - snap*() methods are all updated to take the current scale into account - new variants of snap*() methods are added for separate X/Y control: Added: Region.snapSpaceX/Y() Added: Region.snapSizeX/Y() Added: Region.snapPositionX/Y() - the non-X/Y variants of the above methods are now deprecated: Deprecated: Region.snapSpace() Deprecated: Region.snapSize() Deprecated: Region.snapPosition() - methods to query the scale values of Screen objects: Added: Screen.getOutputScaleX/Y() - properties to query and/or modify the scale values of Window objects: Added Read-Only DoubleProperty: Window.getOutputScaleX/Y() Added Read-Write BooleanProperty: Window.set/getForceIntegerRenderScale() Added Read-Write DoubleProperty: Window.set/getRenderScaleX/Y() The changes have been compiled and tested on Windows and Mac and there were trivial changes needed to the Linux files to adapt to one new method signature, but I haven't done the test build on Linux yet... ...jim
[9] Review request: 8091832: Provide API for getting the Screen scale on HiDPI screens
bug: https://bugs.openjdk.java.net/browse/JDK-8091832 webrev: http://cr.openjdk.java.net/~flar/JDK-8091832/webrev.rt.00/ This webrev fixes pixel snapping and application control over pixel scaling on HiDPI screens: - snap*() methods are all updated to take the current scale into account - new variants of snap*() methods are added for separate X/Y control: Added: Region.snapSpaceX/Y() Added: Region.snapSizeX/Y() Added: Region.snapPositionX/Y() - the non-X/Y variants of the above methods are now deprecated: Deprecated: Region.snapSpace() Deprecated: Region.snapSize() Deprecated: Region.snapPosition() - methods to query the scale values of Screen objects: Added: Screen.getOutputScaleX/Y() - properties to query and/or modify the scale values of Window objects: Added Read-Only DoubleProperty: Window.getOutputScaleX/Y() Added Read-Write BooleanProperty: Window.set/getForceIntegerRenderScale() Added Read-Write DoubleProperty: Window.set/getRenderScaleX/Y() The changes have been compiled and tested on Windows and Mac and there were trivial changes needed to the Linux files to adapt to one new method signature, but I haven't done the test build on Linux yet... ...jim