summaryrefslogtreecommitdiffstats
path: root/src/canvas.rs
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2021-12-27 15:23:11 -0800
committerGitHub <noreply@github.com>2021-12-27 18:23:11 -0500
commit9eabb061aaad8a1ebf6545dc8f36c98c1e622774 (patch)
tree4b150427f3776fb713483c8448b827eccb8f01d8 /src/canvas.rs
parentc92cfc644d0601fad89312b5b282c4e3ebbcc072 (diff)
feature: add basic page up/down scrolling (#646)
Adds page up/down scrolling support to respectively scroll up/down by a full page. Note that this is mostly just to get the feature out for those interested, and is admittedly a bit rushed - I will be rewriting all logic involving event handling as part of state refactor anyways, so this will also get changed in the work done there, and therefore, I kinda just sped through this.
Diffstat (limited to 'src/canvas.rs')
-rw-r--r--src/canvas.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/canvas.rs b/src/canvas.rs
index c8f62640..f19481e0 100644
--- a/src/canvas.rs
+++ b/src/canvas.rs
@@ -695,6 +695,13 @@ impl Painter {
}
})?;
+ if let Some(updated_current_widget) = app_state
+ .widget_map
+ .get(&app_state.current_widget.widget_id)
+ {
+ app_state.current_widget = updated_current_widget.clone();
+ }
+
app_state.is_force_redraw = false;
app_state.is_determining_widget_boundary = false;