Summary: | Owner-drawn Table/Tree: provide flag for drawing rollover tooltip | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Thomas Singer <ts-swt> |
Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
Status: | NEW --- | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | alexandr.miloslavskiy, ts-swt, twolf |
Version: | 4.22 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows 10 | ||
Whiteboard: |
Description
Thomas Singer
2021-10-17 09:43:57 EDT
I ran into this in the EGit StagingView recently. See [1]. My findings were that the GC in the paint listener is clipped when drawing in the table, and is not clipped when drawing in that native hover. So I used tree.addListener(SWT.PaintItem, event -> { boolean inHover = !event.gc.isClipped(); // Do whatever needs to be done, depending on inHover } [1] https://git.eclipse.org/r/c/egit/egit/+/182394 Hi Thomas, Thanks for this hint. It looks like this rollover tooltip only exists on Windows, so it probably makes not much sense to implement that globally. On OS X there is such a hover, too. Err, you are right. I was not waiting long enough. |