Skip to content

Conversation

wahlbrink
Copy link
Contributor

Fixes: #3010

Copy link
Contributor

github-actions bot commented Aug 28, 2025

Test Results

 3 018 files  ±0   3 018 suites  ±0   2h 20m 16s ⏱️ - 1m 58s
 8 215 tests ±0   7 965 ✅  - 1  249 💤 ±0  1 ❌ +1 
23 565 runs  ±0  22 770 ✅  - 1  794 💤 ±0  1 ❌ +1 

For more details on these failures, see this check.

Results for commit 5390df7. ± Comparison against base commit b9ab7dc.

♻️ 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.

Thank you for proposing this fix! I have one question regarding the proposed solution, as it appears more complex to me than required.


return bracketImage;
int height= styledText.getLineHeight();
return new Image(styledText.getDisplay(), new ImageDataProvider() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any reason to use an ImageDataProvider rather than an ImageGcDrawer?
This requires to manually implement proper line width calculation and line rendering instead of just using gc.drawLine() like in the original code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This creates a 1-bit image as before.

Copy link
Contributor

Choose a reason for hiding this comment

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

What do you mean with "1-bit image"? Do you mean that the line is 1 pixel wide? That's the intended behavior of setLineWidth(0). Changing that to setLineWidth(1) should resolve it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

1-bit image = image with 1-bit color palette = a pixels uses 1-bit = colloquially called black-and-white image

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. But is it really necessary/beneficial to keep it like that?

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.

Ctrl+Shift+Insert in Eclipse key bindings doesn't show insert caret when monitor zoom ≠ 100%

2 participants