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

[Feature request] Hold on hover #24

Closed
red-avtovo opened this issue Jul 10, 2024 · 2 comments · Fixed by #26
Closed

[Feature request] Hold on hover #24

red-avtovo opened this issue Jul 10, 2024 · 2 comments · Fixed by #26

Comments

@red-avtovo
Copy link

Hey!
First of all, thank you very much for such a nice library, that I really enjoy using in my project.
It would be awesome if I could hover a mouse on a toast and it could freeze both the timer and the progress bar so I could slowly read the output and once I remove my mouse from the toast it may continue and eventually destroy itself

@ItsEthra
Copy link
Owner

Hi, I agree that might be a useful feature. It seems to be pretty straight forward to implement. Relevant code here:

egui-notify/src/lib.rs

Lines 215 to 221 in 2855ed2

// Decrease duration if idling
if let Some((_, d)) = toast.duration.as_mut() {
if toast.state.idling() {
*d -= ctx.input(|i| i.stable_dt);
update = true;
}
}

I'm somewhat busy at the moment but if you are willing to implement it yourself I'll happily accept a PR.

bircni added a commit to bircni/egui-notify that referenced this issue Aug 2, 2024
@bircni bircni mentioned this issue Aug 2, 2024
@red-avtovo
Copy link
Author

Thanks for implementing this 🫶

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants