-
Notifications
You must be signed in to change notification settings - Fork 162
Replace usages of new Image(device, width, height) #1924
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
3b9939a
to
fed7869
Compare
fed7869
to
19e0978
Compare
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.
Can you please share some information on how to test the change to StyledText
(for regression)? Where can those affected carets be seen?
bundles/org.eclipse.swt.tools.spies/src/org/eclipse/swt/tools/internal/Sleak.java
Outdated
Show resolved
Hide resolved
...les/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
Outdated
Show resolved
Hide resolved
I have tested it with snippet332 replacing the styleText string with "English متن بالعربية עברית " and forcing isBidiCaret() method in StyledText class to return true (cos it checks from OS if it is Bidirectional Platform) and with my changes the caret looks same compared to previous versions. I am not sure I could programmatically write any test for it. |
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.
I have tested it with snippet332 replacing the styleText string with "English متن بالعربية עברית " and forcing isBidiCaret() method in StyledText class to return true (cos it checks from OS if it is Bidirectional Platform)
Thank you. I have just tested with that as well and found the adapted code to be working fine. I actually expected the carets to become "better" because of proper scaling, but they are regenerated on a zoom change for the StyledText anyway, which makes the results look exactly the same, even in monitor-specific scaling scenarios.
Could you please inline at least the single-line lamda as proposed by Hannes? For the others I (personally) would be in favor of having it assigned to a variable to not make the code overly complex, but having a better name like leftCaretDrawer
or the like would be good.
61f299b
to
b912d0b
Compare
Replacing it with imageGcDrawer
Replacing it with imageGcDrawer