From d7bc5105f0fb572beb2ae4e5b033a343ae12f2dc Mon Sep 17 00:00:00 2001 From: lukeflo Date: Fri, 11 Oct 2024 14:05:34 +0200 Subject: scrollbar for entries and keywords. scroll symbols for abstract first steps --- src/frontend/app.rs | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'src/frontend/app.rs') diff --git a/src/frontend/app.rs b/src/frontend/app.rs index 26b9a13..ee2ab05 100644 --- a/src/frontend/app.rs +++ b/src/frontend/app.rs @@ -175,15 +175,25 @@ impl App { } pub fn scroll_info_down(&mut self) { - self.scroll_info = self.scroll_info + 1; + // self.entry_table.entry_info_scroll = self.entry_table.entry_info_scroll + 1; + self.entry_table.entry_info_scroll = self.entry_table.entry_info_scroll.saturating_add(1); + self.entry_table.entry_info_scroll_state = self + .entry_table + .entry_info_scroll_state + .position(self.entry_table.entry_info_scroll.into()); } pub fn scroll_info_up(&mut self) { - if self.scroll_info == 0 { - {} - } else { - self.scroll_info = self.scroll_info - 1; - } + // if self.entry_table.entry_info_scroll == 0 { + // {} + // } else { + // self.entry_table.entry_info_scroll = self.entry_table.entry_info_scroll - 1; + // } + self.entry_table.entry_info_scroll = self.entry_table.entry_info_scroll.saturating_sub(1); + self.entry_table.entry_info_scroll_state = self + .entry_table + .entry_info_scroll_state + .position(self.entry_table.entry_info_scroll.into()); } // Search Area -- cgit v1.2.3