From 1c854d127f1d3fcd4b56e11e3c7f6e5a0e49f55d Mon Sep 17 00:00:00 2001 From: Gabriel Kaszewski Date: Fri, 19 Jun 2026 13:35:46 +0200 Subject: [PATCH] fix bottom scroll artifacts, slow scroll for readability --- crates/client-domain/src/render_engine.rs | 8 ++++---- crates/client-domain/src/scroll.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/client-domain/src/render_engine.rs b/crates/client-domain/src/render_engine.rs index 0d85caf..cb217d6 100644 --- a/crates/client-domain/src/render_engine.rs +++ b/crates/client-domain/src/render_engine.rs @@ -104,11 +104,11 @@ impl RenderEngine { for cmd in &mut cmds { cmd.y = cmd.y.saturating_sub(scroll_offset); } - cmds.retain(|cmd| { - let line_h = self.metrics.char_height(cmd.font); - cmd.y >= bounds.y && cmd.y + line_h <= bounds.y + bounds.height - }); } + cmds.retain(|cmd| { + let line_h = self.metrics.char_height(cmd.font); + cmd.y >= bounds.y && cmd.y + line_h <= bounds.y + bounds.height + }); cmds } diff --git a/crates/client-domain/src/scroll.rs b/crates/client-domain/src/scroll.rs index dc65e1f..62f7b55 100644 --- a/crates/client-domain/src/scroll.rs +++ b/crates/client-domain/src/scroll.rs @@ -1,7 +1,7 @@ use std::time::Duration; -const PAUSE_DURATION: Duration = Duration::from_secs(2); -const SCROLL_SPEED_PX_PER_SEC: f32 = 30.0; +const PAUSE_DURATION: Duration = Duration::from_secs(3); +const SCROLL_SPEED_PX_PER_SEC: f32 = 15.0; #[derive(Debug)] pub struct ScrollState {