Skip to content

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

Merged
merged 2 commits into from
Mar 27, 2025

Conversation

ShahzaibIbrahim
Copy link
Contributor

Replacing it with imageGcDrawer

Copy link
Contributor

github-actions bot commented Mar 20, 2025

Test Results

   545 files  + 6     545 suites  +6   28m 38s ⏱️ - 4m 46s
 4 367 tests +37   4 351 ✅ +35   16 💤 +3  0 ❌  - 1 
16 616 runs  +37  16 502 ✅ +35  114 💤 +3  0 ❌  - 1 

Results for commit 7214710. ± Comparison against base commit e8ed06e.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@HeikoKlare HeikoKlare left a 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?

@ShahzaibIbrahim
Copy link
Contributor Author

Can you please share some information on how to test the change to StyledText (for regression)? Where can those affected carets be seen?

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.

Copy link
Contributor

@HeikoKlare HeikoKlare left a 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.

@ShahzaibIbrahim ShahzaibIbrahim force-pushed the master-188 branch 2 times, most recently from 61f299b to b912d0b Compare March 26, 2025 17:12
@HeikoKlare HeikoKlare merged commit d53701b into eclipse-platform:master Mar 27, 2025
15 checks passed
@HeikoKlare HeikoKlare deleted the master-188 branch March 27, 2025 09:05
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.

Replace usages of new Image(device, width, height) / new GC(image)
3 participants