gef-classic
gef-classic copied to clipboard
Giant cursors on Macbook with retina display
Hello, I think this must be new as a result of the latest cursor updates, but the custom gef cursors are huge now on high-resolution displays (at least for Macs).
Normal cursor:
Giant plug cursor:
Giant add cursor:
GEF is correctly loading the 2x versions of the cursors, but it seems that they are not being displayed in the correct size. I.e., a 2x version of a 16 bit icon should take up the same amount of physical screen space on a retina display as a 1x 16 bit icon on a normal display, not just be twice as big.
I'm not very familiar with cursors. Are they designed to scale with the display resolution?
Eclipse GEF GEF Classic Draw2d 3.14.100.202311222042 org.eclipse.draw2d Eclipse GEF GEF Classic GEF (MVC) 3.16.0.202311222042 org.eclipse.gef
Macbook Pro 2021 macOS Sonoma 14.2.1 16" Retina (resolution 3456 x 2234) Apple M1 Max
The problem is here:
https://github.com/eclipse/gef-classic/blob/586bead1bb52bba21210349ab6be90d4f11780aa/org.eclipse.gef/src/org/eclipse/gef/SharedCursors.java#L56-L74
On Mac and Linux X11 the device zoom for cursors should always be 100. On Windows and Linux Wayland the device zoom for cursors should be as reported.
This is how I implemented it in Archi:
https://github.com/archimatetool/archi/blob/master/com.archimatetool.editor/src/com/archimatetool/editor/diagram/tools/ExtCombinedTemplateCreationEntry.java
and
https://github.com/archimatetool/archi/blob/b5a2eef733d7c3a933d69f58d6452274ae0a5842/com.archimatetool.editor/src/com/archimatetool/editor/ui/ImageFactory.java#L72-L80
So a check needs to added in getDeviceZoom to return 100 if on Mac or Linux X11.
Created PR https://github.com/eclipse/gef-classic/pull/356
@kysmith-csg Can you test the latest code to see if this fixes the issue?
@Phillipus thank you for the very quick fix! With the nightly build it seems to be fixed. Looks much more normal now!
(is it just me or is the + cursor bigger than the others?)
Eclipse GEF GEF Classic GEF (MVC) 3.17.0.202401141938 org.eclipse.gef Eclipse GEF GEF Classic Draw2d 3.15.0.202401141938 org.eclipse.draw2d
This issue is stale because it has been open for 90 days with no activity.
This issue was closed because it has been inactive for 180 days since being marked as stale.
@azoitl this is resolved now yes? Unless those changes didn't make it in?
Note that I haven't specifically tested it, although I haven't noticed them being huge.
cc @Phillipus
@kysmith-csg thx for coming back to us for that. @Phillipus fix is in GEF Classic since 3.19. I guess as in your last message you where not fully sure if it is fixed or not we still haven't closed the issue. But if you are fine I would just close it.