Bug 179368 - Need to draw text selection using native functionality
Summary: Need to draw text selection using native functionality
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.3 M7   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2007-03-26 15:14 EDT by Felipe Heidrich CLA
Modified: 2007-05-17 17:03 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.