Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
  • Loading branch information
lucasmerlin and emilk authored May 27, 2024
1 parent 6c58dbe commit f8c9592
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/egui/src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ impl Ui {
/// A positive Y-value indicates the content is being moved down,
/// as when swiping down on a touch-screen or track-pad with natural scrolling.
///
/// If this is called multiple times per frame for the same [`ScrollArea`], the deltas will be combined.
/// If this is called multiple times per frame for the same [`ScrollArea`], the deltas will be summed.
///
/// /// See also: [`Response::scroll_to_me`], [`Ui::scroll_to_rect`], [`Ui::scroll_to_cursor`]
///
Expand Down
2 changes: 1 addition & 1 deletion crates/egui_demo_lib/src/demo/scrolling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ impl super::View for ScrollTo {
scroll_top |= ui.button("Scroll to top").clicked();
scroll_bottom |= ui.button("Scroll to bottom").clicked();
if ui.button("Scroll down by 64px").clicked() {
scroll_delta = Some(Vec2::new(0.0, -64.0));
scroll_delta = Some(64.0 * Vec2::UP); // move contents up
}
});

Expand Down

0 comments on commit f8c9592

Please sign in to comment.