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

Wait with showing tooltip until mouse has been still for 300ms #3977

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

emilk
Copy link
Owner

@emilk emilk commented Feb 5, 2024

You can change this with `style.interaction.tooltip_delay§

@emilk emilk added the egui label Feb 5, 2024
if 0.0 < time_til_tooltip {
// Wait until the mouse has been still for a while
self.ctx
.request_repaint_after(std::time::Duration::from_secs_f32(time_til_tooltip));
Copy link
Owner Author

@emilk emilk Feb 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately this doesn't save any CPU right now because of #3109, but that will soon be fixed

@emilk emilk merged commit d018265 into master Feb 5, 2024
35 of 36 checks passed
@emilk emilk deleted the emilk/default-tooltip-delay branch February 5, 2024 13:35
hacknus pushed a commit to hacknus/egui that referenced this pull request Oct 30, 2024
…#3977)

You can change this with `style.interaction.tooltip_delay§
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant