Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 191673 - [QuickAccess] Tooltips only partially overlap the hovered item
Summary: [QuickAccess] Tooltips only partially overlap the hovered item
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M4   Edit
Assignee: Boris Bokowski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 178044
Blocks:
  Show dependency tree
 
Reported: 2007-06-08 06:18 EDT by Markus Keller CLA
Modified: 2007-12-11 15:57 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2007-06-08 06:18:03 EDT
I20070608-0010

The tooltip behavior for the Quick Access dialog does not feel "native". When hovering over an item, you always get a tooltip that partially overlaps the item, which makes it hard to read.

On Windows, tree items usually get a native "tooltip" that is drawn directly on top of the item but is not cut at the border of the table / tree.

See also bug 178044 and bug 174675.
Comment 1 Kevin McGuire CLA 2007-06-08 15:56:19 EDT
I'm not seeing the tooltips being cut - they are extending full length beyond the right edge of the Quick Acess dialog.

However, its typical for them to appear directly overlaying the text in question, while as in this case we seem to be tracking the pointer location and thus partially covering the item above or below.  Is that's what's making it feel non-native?
Comment 2 Boris Bokowski CLA 2007-06-08 16:13:16 EDT
I used JFace custom tooltips for QuickAccess as a workaround for bug 178044.
Comment 3 Thomas Schindl CLA 2007-06-09 07:06:50 EDT
JFace-Tooltips by default always pop-up at the location the current mouse pointer is shown but one can overwrite the default behaviour by using overloading ToolTip#getLocation(Point,Event)
Comment 4 Markus Keller CLA 2007-07-24 04:32:35 EDT
FWIW, here's the hack I talked about in bug 178044 (just want to get this out of my workspace; hardcoded offsets would have to be removed before this can be released).

Add these methods to org.eclipse.ui.internal.quickaccess.QuickAccessDialog
.createDialogArea(...).new DefaultToolTip() {...}:

	public Point getLocation(Point tipSize, Event event) {
		TableItem item = table.getItem(new Point(event.x, event.y));
		if (item != null) {
			Point pos= Geometry.getLocation(item.getTextBounds(1));
			pos.x += 13;
			pos.y -= 2;
			return table.toDisplay(pos);
		}
		return super.getLocation(tipSize, event);
	}
	
	protected void afterHideToolTip(Event e) {
		if (e == null)
			return;
		if (e.button != 1)
			return;
		if (e.type != SWT.MouseDown && e.type != SWT.MouseUp)
			return;
		e.display.post(e);
	}
Comment 5 Boris Bokowski CLA 2007-11-26 17:18:03 EST
Time to remove the JFace tooltips from QuickAccess...
Comment 6 Boris Bokowski CLA 2007-12-11 15:57:54 EST
I have removed the custom tooltip code from QuickAccessDialog. 

Note that the native tooltips are too wide right now, see bug 212663.