Bug 537895 - cannot load icons for Hi-DPI displays in GEF application
Summary: cannot load icons for Hi-DPI displays in GEF application
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF Geometry (show other bugs)
Version: 5.0.100   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-13 05:51 EDT by Shenwei Zheng CLA
Modified: 2019-01-22 10:20 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shenwei Zheng CLA 2018-08-13 05:51:44 EDT
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.
Comment 1 Matthias Wienand CLA 2019-01-11 11:03:25 EST
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.
Comment 2 Shenwei Zheng CLA 2019-01-21 04:05:39 EST
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?
Comment 3 Matthias Wienand CLA 2019-01-22 10:20:20 EST
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).