Skip to content

Conversation

@arunjose696
Copy link
Contributor

This change ensures that cursor images scale appropriately based on the display's zoom level .

Steps to reproduce

Steps to reproduce cursors are mentioned in vi-eclipse/Eclipse-Platform#331

To test with GEF, one should check out the GEF Classic repository: https://github.com/eclipse-gef/gef-classic Then import the org.eclipse.draw2d, org.eclipse.gef and the org.eclipse.gef.examples.logic (the latter for testing) to your Eclipse development workspace and add them to the product you are testing. With the "New" wizard, you can create a logic example to test out the cursors via inserting elements, dragging and dropping etc. (see also this issue for an example): Image
Cursors can be seen once a component is selected and mouse is moved around

Cursors from SharedCursors.java can be seen during selecting components in pallete and moving them to diagram.

Cursors from FlyoutPaletteComposite.java appear when dragging and repositioning the palette menu.

@azoitl azoitl requested a review from ptziegler June 30, 2025 19:00
@arunjose696 arunjose696 force-pushed the arunjose696/CursorsHidpi branch 5 times, most recently from f826b62 to 99c1aae Compare July 2, 2025 13:43
@arunjose696 arunjose696 changed the title Cursors in GEF uses Image instead of ImageData Cursors in GEF uses ImageDataProvider instead of ImageData Jul 2, 2025
Copy link
Contributor

@ptziegler ptziegler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outside of the minor refactoring, I'm happy with this one. Though perhaps it makes sense to wait for the SWT PR to be merged, just in case there are further adaptations needed.

This is required for the cursor images to be scaled appropriately
according to the given zoom
@ptziegler
Copy link
Contributor

The SWT PR has been merged, but I don't think it's included in the M1. However, this should be an issue as GEF will fail to find the expected constructor and fall back to the current implementation. @arunjose696 Thanks for PR and also for compromising on the backwards compatibility.

@ptziegler ptziegler merged commit e2ba6cd into eclipse-gef:master Jul 5, 2025
14 checks passed
@HeikoKlare HeikoKlare deleted the arunjose696/CursorsHidpi branch July 7, 2025 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Cursors in GEF use ImageDataProvider instead of ImageData

2 participants