HiDPI support for UI's employing the SWT-AWT bridge
Currently there is no handling of HiDPI displays and specifically display zoom settings in the Simantics codebase.
Normal SWT UI's don't need any special handling, but any UI's that deal with SWTAWTComponent (the SWT-AWT bridge) or our G2D diagram framework have to take into account scaling. This means that any pixel space coordinate data fed to SWT must be downscaled according to SWT's current zoom setting.
For this purpose, SWT has its own internal class DPIUtil
. However, since the class is internal I suggest creating our own wrapper for it to not force other code to be exposed to internal code.
SWTDPIUtil has been added to wrap SWT's internal DPIUtil.
Edited by Tuukka Lehtonen