[bisq-network/bisq] Prevent tooltip popover flicker upon mouseover (#3211)

Steven Barclay notifications at github.com
Fri Sep 6 01:01:32 UTC 2019


It's definitely not a simple case of the popover appearing underneath the mouse, as exactly the same oscillation occurs if the popover is moved well out of the way of the mouse, e.g. changing the line:

            popover.show(currentIcon, -17);
to
            popover.show(currentIcon, -170);

On the other hand, commenting out just the lines showing/hiding the popover _does_ suppress the oscillation (of the MOUSE_ENTERED, MOUSE_EXITED events), indicating that it is the display of the popover itself and not e.g. the greying out of the 'i' icon which triggers a MOUSE_EXITED event.

If the mouse entry & exit events are logged, a rapid succession of repeating lines like the following occurs:

MOUSE ENTERED: MouseEvent [source = Label at 7bc7e148[styleClass=label awesome icon info]'?', target = Label at 7bc7e148[styleClass=label awesome icon info]'?', eventType = MOUSE_ENTERED, consumed = false, x = 13.0, y = 11.0, z = 0.0, button = NONE, pickResult = PickResult [node = Text[text="?", x=0.0, y=0.0, alignment=LEFT, origin=BASELINE, boundsType=LOGICAL_VERTICAL_CENTER, font=Font[name=FontAwesome Regular, family=FontAwesome, style=Regular, size=16.0], fontSmoothingType=LCD, fill=0x25b135ff], point = Point3D [x = 13.0, y = -5.0, z = 0.0], distance = 1324.8780366869516]
MOUSE EXITED: MouseEvent [source = Label at 7bc7e148[styleClass=label awesome icon info]'?', target = Label at 7bc7e148[styleClass=label awesome icon info]'?', eventType = MOUSE_EXITED, consumed = false, x = 13.0, y = 11.0, z = 0.0, button = NONE, pickResult = PickResult [node = Text[text="?", x=0.0, y=0.0, alignment=LEFT, origin=BASELINE, boundsType=LOGICAL_VERTICAL_CENTER, font=Font[name=FontAwesome Regular, family=FontAwesome, style=Regular, size=16.0], fontSmoothingType=LCD, fill=0x25b135ff], point = Point3D [x = 13.0, y = -5.0, z = 0.0], distance = 1324.8780366869516]

Even when there is no movement of the mouse, the oscillation can still occur, although it seems to stop by itself after a few seconds.

I believe what is happening is that the initial display of the popover sometimes causes a brief flicker of the mouse cursor (at least on Windows), as it changes from a hand to an arrow (the wrong shape) and then sometimes back to a hand again. This causes a pair of MOUSE_EXITED and MOUSE_ENTERED events to trigger in rapid succession (even though the mouse hasn't moved). I'm not yet sure why calling PopOver.show(..) would have this effect on the mouse - perhaps it's a problem with the underlying library.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/3211#issuecomment-528664458
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20190905/8e750ec8/attachment.html>


More information about the bisq-github mailing list