We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0981789 commit 4407cdbCopy full SHA for 4407cdb
examples/ui/ui.rs
@@ -316,8 +316,8 @@ fn mouse_scroll(
316
MouseScrollUnit::Line => mouse_wheel_event.y * 20.,
317
MouseScrollUnit::Pixel => mouse_wheel_event.y,
318
};
319
- scrolling_list.position -= dy;
320
- scrolling_list.position = scrolling_list.position.clamp(0., max_scroll);
+ scrolling_list.position += dy;
+ scrolling_list.position = scrolling_list.position.clamp(-max_scroll, 0.);
321
style.position.top = Val::Px(scrolling_list.position);
322
}
323
0 commit comments