linebender / druid

A data-first Rust-native UI design toolkit.
https://linebender.org/druid/
Apache License 2.0
9.45k stars 569 forks source link

Fix `ScrollComponent` not handling `LifeCycle::HotChanged`. #2343

Closed xStrom closed 1 year ago

xStrom commented 1 year ago

This PR adds LifeCycle::HotChanged handling to ScrollComponent which allows it to hide the scroll bars when the widget loses hot state but doesn't receive any MouseMove events that would confirm this. This bug was hidden on GTK thanks to #552 but revealed again due to #2324.

The fix can be seen in action with the scroll_colors example as seen below:

before_leave after_leave