From 1cd7ddf4256a992cfd38a53ea98aa576feb6e204 Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Sun, 5 Sep 2021 23:20:42 +0900 Subject: [PATCH] use a outside scroll bar with no borders --- src/components/databases.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/databases.rs b/src/components/databases.rs index e439f08..84b4d57 100644 --- a/src/components/databases.rs +++ b/src/components/databases.rs @@ -49,7 +49,7 @@ impl DatabasesComponent { Self { tree: DatabaseTree::default(), filterd_tree: None, - scroll: VerticalScroll::new(true, true), + scroll: VerticalScroll::new(false, false), input: Vec::new(), input_idx: 0, input_cursor_position: 0, @@ -218,7 +218,8 @@ impl DatabasesComponent { }); draw_list_block(f, chunks[1], Block::default().borders(Borders::NONE), items); - self.scroll.draw(f, area); + self.scroll.draw(f, chunks[1]); + if let Focus::Filter = self.focus { f.set_cursor(area.x + self.input_cursor_position + 1, area.y + 1) }