eclipse.platform.swt icon indicating copy to clipboard operation
eclipse.platform.swt copied to clipboard

Cosmetic issues in rendering when 'line spacing' option is set

Open sratz opened this issue 1 year ago • 0 comments

Cosmetic issues when 'line spacing' is set under Preferences -> General -> Editors -> Text Editors -> Line spacing.

Line spacing 0:

image

image

image

Line spacing >0 (extreme value for demo purposes):

image

image

image

Compare VS Code:

image

image

To summarize:

When line spacing > 0 is enabled, there are several issues: [ ] 1. The spacing is not symmetrical, the text is not centered [ ] 2. The caret is not using the full row height. [ ] 3. There exist some custom carets in https://github.com/eclipse-platform/eclipse.platform.ui/blob/954bc581051c3f0a5ebcacc1d85492d2acd85707/bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java#L6508-L6516 referring to issue https://bugs.eclipse.org/bugs/show_bug.cgi?id=118612 which needs to be addressed also. [x] 4. The text blue selection is not using the full row height. --> https://github.com/eclipse-platform/eclipse.platform.swt/pull/1329

1 and 2 can be fixed in StyledText / StyledTextRenderer. 3 in platform.ui. 4 I am not sure.

sratz avatar Jun 19 '24 07:06 sratz