Community
Participate
Working Groups
As described in this post https://dlsc.com/2017/08/29/javafx-tip-27-hires-retina-icons/, I tried to load icons for a Hi-DPI displays. JavaFX should load the correct icons automatically based on the display resolution. It works fine under a JavaFX application. But it doesn't work under GEF application.
Hi Shenwei, I added an SWT/FX example that loads a high-DPI icon and displays it as the graphic of a button. The example can be found on the current master branch at o.e.gef.fx.examples.swt.HighDpiIconsApp. It works fine for me on a Mac. Currently, I cannot test this on a windows machine. Therefore, I would be glad if you could try the example.
Hi Matthias, I tried the example under Windows with a Hi-DPI display, but I got the cancel button (icon.png), not icon@2x.png. Did you have any changes in the implementation?
Thank you for testing this! No, we did not change the implementation. It is very good to know that this example can be used to reproduce the error. Moreover, this ensures that the problem does only occur in the JavaFX/SWT integration context, i.e. a GEF application running without SWT will not reveal this error. I hope that we can resort to employing a working solution for SWT (but first, we need to research & find that solution).