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

Bug 335056

Summary: Link widget shows IBeam cursor
Product: [Eclipse Project] Platform Reporter: Markus Keller <markus.kell.r>
Component: SWTAssignee: Silenio Quarti <Silenio_Quarti>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: daniel_megert, eclipse.felipe, skovatch
Version: 3.7Flags: eclipse.felipe: review+
Target Milestone: 3.7 RC1   
Hardware: PC   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
New version of Link
none
Small test case.
none
fix none

Description Markus Keller CLA 2011-01-21 16:00:49 EST
HEAD Cocoa

The Link widget is a bit distracting, since it shows the IBeam cursor when the mouse is in the widget, but not on text or on a link.

Can easily be seen in the ControlExample with SWT.BORDER and size 100 x 100.
Comment 1 Scott Kovatch CLA 2011-01-21 20:34:18 EST
This is happening because we used NSTextView, which will always set the i-beam cursor if the cursor is not over text. You can designate a cursor to use when the text is over the link or over any of the text, but if it's not the cursor can't be overridden. We also have a two-pixel gutter around the link so it looks like a Label.

The only way we can really fix this is to rewrite Link. The Carbon version of Link wasn't that bad, but it had the wrong colors for the link and disabled text. I'm attaching a new version of Link that uses a TextLayout instead of NSTextView, but we should think about whether or not we want to use it. I can't find any problems at the moment.
Comment 2 Scott Kovatch CLA 2011-01-21 20:34:53 EST
Created attachment 187350 [details]
New version of Link
Comment 3 Scott Kovatch CLA 2011-02-08 13:47:04 EST
Adding Felipe since he owns Link. You can just drop this in and run it.
Comment 4 Scott Kovatch CLA 2011-02-09 14:30:53 EST
Target for 3.7 since it looks bad.
Comment 5 Silenio Quarti CLA 2011-04-29 14:04:17 EDT
Created attachment 194386 [details]
Small test case.
Comment 6 Silenio Quarti CLA 2011-04-29 14:07:56 EDT
Created attachment 194387 [details]
fix

This patch fixes the problem without changing the whole Link implementation. I am not sure the new implementation was fixing something else, but this is not the time for this kind of change.
Comment 7 Silenio Quarti CLA 2011-05-02 15:42:33 EDT
Fixed > 20110502
Comment 8 Markus Keller CLA 2011-05-20 05:37:17 EDT
Verified in I20110519-1138.