selection background drawn with the line spacing for multiline selection
Line selection background is drawn without the line spacing value in the StyledText control. For a multiline selection, a zebra effect occurs which looks questionable from my point of view. In this change, the line spacing height is included when drawing the selection background.
Before with line spacing value 60%:
After with line spacing value 60%:
Test Results
486 files ±0 486 suites ±0 7m 52s :stopwatch: -33s 4 151 tests ±0 4 143 :white_check_mark: ±0 8 :zzz: ±0 0 :x: ±0 16 358 runs ±0 16 266 :white_check_mark: ±0 92 :zzz: ±0 0 :x: ±0
Results for commit d97c17a8. ± Comparison against base commit 2374dcf1.
:recycle: This comment has been updated with latest results.
contributes to https://github.com/eclipse-platform/eclipse.platform.swt/issues/1286
if nobody objects I will merge this today EoB.
@sratz: Do you have more insights into that? Do you see problems / side effects with this change?
@sratz: Do you have more insights into that? Do you see problems / side effects with this change?
This change looks good.
By not extending the selection of the last line to the bottom, this avoids many other minor visual issues (e.g. if there is also an other highlight applied on the last line, such as a marked occurrence or a search result).
However: This change only fixes it for Win32. What about macOS and Linux? Can the same fix be applied there as well?
the latest patch request contains implementations for windows, linux and mac.
Windows:
Linux:
Mac:
I missed to merge this change for the M3 deadline :(
Any chance this could go in for RC1?
The coding is rather safe, especially in the default 'line spacing 0' case, in which no behavior is changed at all.
@sratz
It is fixing a bug and I trust in your good judgement, so I will defer the decision to you with a +1 from me (the PMC).
@sratz
It is fixing a bug and I trust in your good judgement, so I will defer the decision to you with a +1 from me (the PMC).
Thanks!