Bug 179368

Summary: Need to draw text selection using native functionality
Product: [Eclipse Project] Platform Reporter: Felipe Heidrich <eclipse.felipe>
Component: SWTAssignee: Felipe Heidrich <eclipse.felipe>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: carolynmacleod4, john.arthorne, Silenio_Quarti, steve_northover
Version: 3.2Keywords: api
Target Milestone: 3.3 M7   
Hardware: PC   
OS: All   
Whiteboard:

Description Felipe Heidrich CLA 2007-03-26 15:14:35 EDT
Currently StyledText draws the text selection trim by using GC#fillRectangle (int, int, int, int). 

This limits how the selection is drawn in many ways:
 - it is always drawn before or after the text
 - it is always a rectangle
 - it is always a solid color

In some platforms this can cause the selection in StyledText to differ from the native behaviour:
In Mac, the text selection can have trapezoid form
In WPF, the text selection is drawn using alpha transparency

We suggested to fix this by moving all the text selection drawing down to TextLayout.
Comment 1 Steve Northover CLA 2007-03-27 12:29:20 EDT
We need to add API to TextLayout to allow us to draw the text selection correctly on Vista, then call that API from StyledText.
Comment 2 Felipe Heidrich CLA 2007-03-29 19:04:58 EDT
fixed in head > 20070329
Comment 3 John Arthorne CLA 2007-04-17 16:51:35 EDT
Steve, I assume this has your PMC +1 for API added after the API freeze.
Comment 4 Steve Northover CLA 2007-04-17 17:27:24 EDT
Yes, it was approved on the pmc list by someone other than me.