diff options
| author | lukeflo | 2024-10-11 14:05:34 +0200 |
|---|---|---|
| committer | lukeflo | 2024-10-12 22:41:38 +0200 |
| commit | d7bc5105f0fb572beb2ae4e5b033a343ae12f2dc (patch) | |
| tree | 471932b621f1e4cbedf9eeaf4bb7ead74f0af95f /src/frontend/app.rs | |
| parent | 1ad9a97e9a25622a9946cb9c55705922c42d9149 (diff) | |
| download | bibiman-d7bc5105f0fb572beb2ae4e5b033a343ae12f2dc.tar.gz bibiman-d7bc5105f0fb572beb2ae4e5b033a343ae12f2dc.zip | |
scrollbar for entries and keywords. scroll symbols for abstract first steps
Diffstat (limited to 'src/frontend/app.rs')
| -rw-r--r-- | src/frontend/app.rs | 22 |
1 files changed, 16 insertions, 6 deletions
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 |
