Skip to content

Draw squiggles and folding dots in points on scaled displays - #4374

Merged
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:lv/jface-text-hidpi-hairlines
Sep 29, 2026
Merged

vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:lv/jface-text-hidpi-hairlines

Conversation

@vogella

@vogella vogella commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

AnnotationPainter.SquigglesStrategy draws its zigzag with line width 0 and the collapsed region marker of ProjectionSupport draws its two dots with drawPoint.
On Windows both stay one device pixel while the geometry around them scales, so they get thinner the higher the zoom.
This draws the squiggle as a 1 point antialiased line and the dots as 1 point squares, which is what GTK already renders.
On Linux GTK at 200 percent, before and after captures of the marker and of a SquigglesStrategy squiggle are pixel identical, as expected.
Note that the SDK editors draw squiggles through UnderlineStrategy, so that part mainly helps clients of the deprecated strategy.
Windows screenshots will be added in the next days.

@github-actions

github-actions Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

   861 files  ±0     861 suites  ±0   1h 1m 23s ⏱️ + 9m 39s
 8 345 tests ±0   8 102 ✅ ±0  243 💤 ±0  0 ❌ ±0 
20 904 runs  ±0  20 234 ✅ ±0  670 💤 ±0  0 ❌ ±0 

Results for commit 871d295. ± Comparison against base commit 6cd9210.

♻️ This comment has been updated with latest results.

SquigglesStrategy draws with line width 0 and the collapsed region
marker draws its dots with drawPoint. On Windows both stay one device
pixel while the geometry around them scales with the zoom.

Use a 1 point antialiased line and 1 point squares, which matches what
GTK already renders.

Assisted-by: multiple AI agents and layers of automated tooling 🤖
@vogella

vogella commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Both before:
before-200-full

Both after:

after-200-full

folding dots:

marker-200

squiggles:

squiggle-200

@vogella
vogella marked this pull request as ready for review September 28, 2026 09:38
@vogella
vogella force-pushed the lv/jface-text-hidpi-hairlines branch 2 times, most recently from 797ce88 to 871d295 Compare September 28, 2026 09:44
@vogella
vogella merged commit c830b05 into eclipse-platform:master Sep 29, 2026
18 checks passed
@vogella
vogella deleted the lv/jface-text-hidpi-hairlines branch September 29, 2026 12:06
@BeckerWdf

Copy link
Copy Markdown
Member

nice fix

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.

2 participants