From a6e011261d815ebab459d047678f34cf41488a2b Mon Sep 17 00:00:00 2001 From: Developer Date: Fri, 15 May 2026 21:57:45 +0800 Subject: [PATCH] fix(pagination): shrink window_back to 2 lines, reduce default paragraph spacing to 0 --- src/reader.rs | 2 +- src/style.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/reader.rs b/src/reader.rs index fc7e960..6a62ed0 100644 --- a/src/reader.rs +++ b/src/reader.rs @@ -425,7 +425,7 @@ pub fn calculate_pages(text: &str, chars_per_line: usize, lines_per_page: usize) } if line_count >= lines_per_page && i > page_start { - let window_back = chars_per_line * lines_per_page / 3; + let window_back = chars_per_line * 2; let search_start = page_start.max(i.saturating_sub(window_back)); let mut split = i; for j in (search_start..i).rev() { diff --git a/src/style.rs b/src/style.rs index ee57581..65ae12a 100644 --- a/src/style.rs +++ b/src/style.rs @@ -24,7 +24,7 @@ impl StyleProfile { name: "Kindle 默认".into(), alignment: TextAlignment::Left, line_spacing: 1.8, - paragraph_spacing: 1.0, + paragraph_spacing: 0.0, first_line_indent: 2.0, font_size: 20.0, },