Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tool tips can stay around #141

Open
wayfu opened this issue Aug 21, 2024 · 6 comments
Open

tool tips can stay around #141

wayfu opened this issue Aug 21, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@wayfu
Copy link

wayfu commented Aug 21, 2024

image

@vsariola
Copy link
Owner

These are from the gioui GUI library, specifically from extras (x) package under it: https://pkg.go.dev/gioui.org/x/component#Tooltip

I can try to update to latest version of gioui to see if this fixes the issue, but upgrading gioui is always a pain as they break their APi constantly as they are still not at v1.0.

If not, I may need to contact the maintainer of the x package to fix this.

@vsariola vsariola added the bug Something isn't working label Aug 22, 2024
@vsariola
Copy link
Owner

This does not seem to be fixed by latest gioui, I need to ask the maintainers of gioui what to do about it.

@wayfu
Copy link
Author

wayfu commented Aug 22, 2024

ah, if it's not an easy fix for you, no need to prioritize this one - it's purely cosmetic. thank you for looking into it

@vsariola
Copy link
Owner

There was no need to look for it; I already knew about it but never got around opening an issue here or gioui issue tracker, as the issue was quite minor one and it's not in Sointu codebase. But it's good to have this issue here as a reminder; hopefully there's a way to fix it someday.

@vsariola
Copy link
Owner

vsariola commented Sep 6, 2024

Gioui widgets simply do not get pointer.Leave events when the pointer leaves the window completely. Unless they change gioui internally, there's no way to rely on this. The problem seems to be that every platform (windows, macos etc.) you need a different way to detect when cursor leaves window, so this is not impossible but not a zero-amount of work either.

It might easiest just to make the tooltips have some upper time limit and then fade them away after that, so they don't hang around forever. This also is not supported by the tooltip package, but at least needs no platform-specific code, so might be easier to make.

@vsariola
Copy link
Owner

vsariola commented Sep 6, 2024

So just to clarify: the reason the tooltips don't leave is that the pointer quickly moves out of the window, and the tooltip widget does not get pointer.Leave event. This event is what triggers the hiding of the tooltip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants