Community
Participate
Working Groups
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.
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?
I used JFace custom tooltips for QuickAccess as a workaround for bug 178044.
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)
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); }
Time to remove the JFace tooltips from QuickAccess...
I have removed the custom tooltip code from QuickAccessDialog. Note that the native tooltips are too wide right now, see bug 212663.