Skip to content

Commit e266ec1

Browse files
amartya4256fedejeanne
authored andcommitted
Paint Whole FormText to Avoid Rendering Artifacts
This commit updates the painting logic of FormText to render the entire content every time, rather than in segments. Painting in parts—particularly during scrolling—can introduce precision loss when using fractional (e.g., 1.25x, 1.75x) scaling factors. This may result in skipped pixels and visual glitches in the UI. Fixes: #2997
1 parent bb94f85 commit e266ec1

File tree

1 file changed

+2
-1
lines changed
  • bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets

1 file changed

+2
-1
lines changed

bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormText.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,8 @@ private void paint(PaintEvent e) {
15541554
ensureBoldFontPresent(getFont());
15551555
gc.setForeground(getForeground());
15561556
gc.setBackground(getBackground());
1557-
repaint(gc, e.x, e.y, e.width, e.height);
1557+
Point size = getSize();
1558+
repaint(gc, 0, 0, size.x, size.y);
15581559
}
15591560

15601561
private void repaint(GC gc, int x, int y, int width, int height) {

0 commit comments

Comments
 (0)