Skip to content

Commit

Permalink
Fade in tooltips and windows slightly slower
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Jul 5, 2024
1 parent 3e200cd commit d7881e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/egui/src/containers/area.rs
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ impl Prepared {
let age =
ctx.input(|i| (i.time - last_became_visible_at) as f32 + i.predicted_dt / 2.0);
let opacity = crate::remap_clamp(age, 0.0..=ctx.style().animation_time, 0.0..=1.0);
let opacity = emath::easing::cubic_out(opacity); // slow fade-out = quick fade-in
let opacity = emath::easing::quadratic_out(opacity); // slow fade-out = quick fade-in
ui.multiply_opacity(opacity);
if opacity < 1.0 {
ctx.request_repaint();
Expand Down

0 comments on commit d7881e1

Please sign in to comment.