Bug 562677 - Can't properly highlight multiple selection in a StyledText line (a TextLayout instance)
Summary: Can't properly highlight multiple selection in a StyledText line (a TextLayou...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.16   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 562676
  Show dependency tree
 
Reported: 2020-04-30 17:14 EDT by Mickael Istria CLA
Modified: 2020-09-18 14:17 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mickael Istria CLA 2020-04-30 17:14:55 EDT
Currently, TextLayout doesn't support multiple selected range (one selectionStart and one selectionEnd item in constructor).
The hack used by bug 562676 at the moment consists in drawing the line multiple times with different selection ranges as the background color which is one of the main feedback for selection seems to not be overridden between draws, but that's suboptimal since the newer drawing can override some pixels from former drawing like for example the actual text color, so a text that's supposed to be white on blue background because is selected can appear as black on blue background because is was redrawn with non-matching selection parameters.