Skip to content

Commit

Permalink
Fix PgUp/PgDn freezing
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedilger committed Feb 28, 2024
1 parent 50e47da commit c19ded2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gossip-bin/src/ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1235,12 +1235,12 @@ impl eframe::App for GossipUi {
requested_scroll += 50.0;
}
if i.key_pressed(egui::Key::PageUp) {
let screen_rect = ctx.input(|i| i.screen_rect);
let screen_rect = i.screen_rect;
let window_height = screen_rect.max.y - screen_rect.min.y;
requested_scroll += window_height * 0.75;
}
if i.key_pressed(egui::Key::PageDown) {
let screen_rect = ctx.input(|i| i.screen_rect);
let screen_rect = i.screen_rect;
let window_height = screen_rect.max.y - screen_rect.min.y;
requested_scroll -= window_height * 0.75;
}
Expand Down

0 comments on commit c19ded2

Please sign in to comment.