Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335056 - Link widget shows IBeam cursor
Summary: Link widget shows IBeam cursor
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7   Edit
Hardware: PC Mac OS X
: P3 minor (vote)
Target Milestone: 3.7 RC1   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-21 16:00 EST by Markus Keller CLA
Modified: 2011-05-20 05:37 EDT (History)
3 users (show)

See Also:
eclipse.felipe: review+


Attachments
New version of Link (22.67 KB, text/plain)
2011-01-21 20:34 EST, Scott Kovatch CLA
no flags Details
Small test case. (651 bytes, application/octet-stream)
2011-04-29 14:04 EDT, Silenio Quarti CLA
no flags Details
fix (1.36 KB, patch)
2011-04-29 14:07 EDT, Silenio Quarti CLA
no flags Details | Diff

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