Skip to content

Paint the range indicator with alpha instead of a stipple image - #4294

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:range-indicator-alpha
Open

Paint the range indicator with alpha instead of a stipple image#4294
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:range-indicator-alpha

Conversation

@vogella

@vogella vogella commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

The range indicator in the vertical ruler was drawn from a 1-bit image with every other pixel set, a stipple that fakes a 50 percent tint. On scaled displays the pattern is scaled in blocks of zoom/100 pixels, so at 200 percent the ruler shows a coarse checkerboard in the indicator colour instead of a tint.

The range is now filled with the indicator colour at half alpha, which renders as a smooth tint at every zoom level and keeps the solid one pixel lines at the top and bottom of the range. The cached image, its dispose listener and the recreation on resize or colour change go away with it, so the class shrinks from 176 to 91 lines.

DefaultRangeIndicator built a 1-bit image with every other pixel set to
fake a 50 percent tint. On scaled displays the pattern is drawn in blocks
of zoom/100 pixels, so at 200 percent the ruler shows a coarse
checkerboard instead of a tint.

Fill the range with the indicator colour at half alpha instead, which
renders as a smooth tint at every zoom and removes the cached image, its
dispose listener and the recreation on resize or colour change.
@vogella

vogella commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author
dark-theme-range-indicator-before-after light-theme-range-indicator-before-after

Custom theme (Dracula)

dracula-theme-range-indicator-before-after

Custom theme (AI Neon)

ai-neon-theme-range-indicator-before-after

@github-actions

Copy link
Copy Markdown
Contributor

Test Results

   858 files  ±0     858 suites  ±0   50m 27s ⏱️ - 7m 17s
 8 174 tests ±0   7 931 ✅ ±0  243 💤 ±0  0 ❌ ±0 
20 424 runs  ±0  19 768 ✅ ±0  656 💤 ±0  0 ❌ ±0 

Results for commit 1fea37f. ± Comparison against base commit f0ef795.

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.

1 participant