Commit 4420b90
Use Rectangle.ofFloat for bounds in WM_PAINT to avoid rounding issues
Set paint event bounds using Rectangle.ofFloat in WM_PAINT to prevent rounding errors from pixel-to-point conversions.
The current issue being solved with this is, when resizing or expanding scrollables with styled text (e.g. Git revision information), the width of the newly painted region can be small such that they are non-zero in pixels but rounded down to zero in points (after pixelToPoint call). This causes StyledText::handlePaint to skip drawing due to event.width == 0, resulting in visible rendering artifacts.
Using float-based bounds preserves non-zero regions and prevents missed paint operations during resize.1 parent ddac0aa commit 4420b90
File tree
1 file changed
+1
-1
lines changed- bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1532 | 1532 | | |
1533 | 1533 | | |
1534 | 1534 | | |
1535 | | - | |
| 1535 | + | |
1536 | 1536 | | |
1537 | 1537 | | |
1538 | 1538 | | |
| |||
0 commit comments