Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 123935

Summary: StyledText selections drawn off by one under gnome 2.12
Product: [Eclipse Project] Platform Reporter: Tom Hofmann <eclipse>
Component: SWTAssignee: Felipe Heidrich <eclipse.felipe>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:
Attachments:
Description Flags
vertical-bars.png
none
selection-highlight.png none

Description Tom Hofmann CLA 2006-01-16 04:00:03 EST
3.2 M4

I am using a recent version of gnome/gtk/pango, so this may be a problem of the libraries used etc, but you may be interested anyway.

It seems that StyledText somehow computes/receives the wrong pixel offsets for text selections. A selected text range shows vertical bars at every word separator, and text colored using StyleRanges is off by one compared to the selection.

I will attach a screenshot.

Installed libraries:

pango-1.10.2
gtk2-2.8.7
gnome 2.12
Comment 1 Tom Hofmann CLA 2006-01-16 04:03:01 EST
Created attachment 33057 [details]
vertical-bars.png

Selection in StyledText (Java editor). Note the vertical bars in the background color at word breaks.
Comment 2 Tom Hofmann CLA 2006-01-16 04:03:52 EST
Created attachment 33058 [details]
selection-highlight.png

Selection of a single word. Note how one pixel is missing off the end of the selected 'StyledText' identifier.
Comment 3 Steve Northover CLA 2006-01-16 11:13:53 EST
A dup?
Comment 4 Tom Hofmann CLA 2006-01-16 11:20:57 EST
sorry, didn't check...

*** This bug has been marked as a duplicate of 123425 ***