Skip to content

Commit

Permalink
Change show/hide delays for tooltips
Browse files Browse the repository at this point in the history
500ms seems to be the most frequently used delay before showing a
tooltip. Since the fade-in/fade-out animation already takes some time,
I've set the hide delay to 0.
  • Loading branch information
Procrat committed Mar 28, 2023
1 parent fbfa6ac commit 6bf4b7a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,16 @@
all symbols rendered in a given frame. You can also pause the performance
monitor and inspect results recorded in the past.
- [ToggleButtons can now have tooltips][6035].
- [Rendering of tooltips was improved.][6097] Their text is now more vertically
centered and the delay before showing them was extended.

[3857]: https://github.com/enso-org/enso/pull/3857
[3985]: https://github.com/enso-org/enso/pull/3985
[4047]: https://github.com/enso-org/enso/pull/4047
[4003]: https://github.com/enso-org/enso/pull/4003
[5895]: https://github.com/enso-org/enso/pull/5895
[6035]: https://github.com/enso-org/enso/pull/6035
[6097]: https://github.com/enso-org/enso/pull/6097

#### Enso Standard Library

Expand Down
4 changes: 2 additions & 2 deletions lib/rust/ensogl/app/theme/hardcoded/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ define_themes! { [light:0, dark:1]
// light: rgb(231,235,238), old-dark: Lcha(0.13,0.014,0.18,1.0), dark: rgb(32,34,36)
background = Rgb::from_base_255(231.0, 235.0, 238.0) , Rgba(0.125,0.133,0.141,1.0);
tooltip {
hide_delay_duration_ms = 150.0, 150.0;
show_delay_duration_ms = 150.0, 150.0;
show_delay_duration_ms = 500.0, 500.0;
hide_delay_duration_ms = 0.0, 0.0;
}
component_browser {
panels_gap = 3.0, 3.0;
Expand Down
2 changes: 1 addition & 1 deletion lib/rust/ensogl/component/tooltip/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ impl Tooltip {
);

let hysteretic_transition =
HystereticAnimation::new(network, hide_delay_duration_ms, show_delay_duration_ms);
HystereticAnimation::new(network, show_delay_duration_ms, hide_delay_duration_ms);

frp::extend! { network

Expand Down

0 comments on commit 6bf4b7a

Please sign in to comment.