-
Notifications
You must be signed in to change notification settings - Fork 182
Deprecation: Cursor(Device, ImageData, ImageData, int, int) #2563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ShahzaibIbrahim is it possible to replace the remaining usages of the deprecated methods? There are 5 new warnings (see failing checks)
@fedejeanne those warnings are all from the test. What I can do now is to suppress the warning for deprecation on those test. |
The constructor Cursor(Device, ImageData source, ImageData mask, int hotspotX, int hotspotY) allows creating a cursor by providing a source image and a 1-bit mask to define transparency. This approach requires developers to manually define mask pixels and works reliably only in fixed DPI environments.recommended to use: Cursor(Device device, ImageDataProvider imageDataProvider, int hotspotX, int hotspotY).
2b9121b
to
67bbb41
Compare
It is a good practice before deprecating some method to go through Eclipse TLP codebase and switch to new way. Otherwise we end up with pile of deprecation warnings that make working on the codebase a nightmare. E.g. https://github.com/eclipse-platform/eclipse.platform.ui/pull/3278/checks?check_run_id=51871277212 . Can I count on you doing this work? |
Stop pointing to deprecated Cursor constructors in eclipse-platform/eclipse.platform.swt#2563
Stop pointing to deprecated Cursor constructors in eclipse-platform/eclipse.platform.swt#2563
The constructor Cursor(Device, ImageData source, ImageData mask, int hotspotX, int hotspotY) allows creating a cursor by providing a source image and a 1-bit mask to define transparency. This approach requires developers to manually define mask pixels and works reliably only in fixed DPI environments.
With the introduction of multi-monitor DPI support, this constructor produces inconsistent results.