mirror of
https://github.com/emilk/egui.git
synced 2026-06-28 07:23:13 -04:00
Smooth scrolling (#3884)
This adds smooth scrolling in egui. This makes scrolling in a `ScrollArea` using a notched mouse wheel a lot nicer. `InputState::scroll_delta` has been replaced by `InputState::raw_scroll_delta` and `InputState::smooth_scroll_delta`.
This commit is contained in:
@@ -1115,7 +1115,7 @@ impl Plot {
|
||||
}
|
||||
}
|
||||
if allow_scroll {
|
||||
let scroll_delta = ui.input(|i| i.scroll_delta);
|
||||
let scroll_delta = ui.input(|i| i.smooth_scroll_delta);
|
||||
if scroll_delta != Vec2::ZERO {
|
||||
transform.translate_bounds(-scroll_delta);
|
||||
auto_bounds = false.into();
|
||||
|
||||
Reference in New Issue
Block a user