Skip to content

Commit 84d44a8

Browse files
committed
Add scrollbar in branchlist
1 parent 8bf0d78 commit 84d44a8

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/components/select_branch.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use tui::{
2121
backend::Backend,
2222
layout::{Alignment, Rect},
2323
text::{Span, Spans, Text},
24-
widgets::{Block, BorderType, Borders, Clear, Paragraph},
24+
widgets::{Block, Borders, Clear, Paragraph},
2525
Frame,
2626
};
2727

@@ -79,11 +79,18 @@ impl DrawableComponent for SelectBranchComponent {
7979
Block::default()
8080
.title(strings::SELECT_BRANCH_POPUP_MSG)
8181
.borders(Borders::ALL)
82-
.border_type(BorderType::Thick),
8382
)
8483
.alignment(Alignment::Left),
8584
area,
8685
);
86+
87+
ui::draw_scrollbar(
88+
f,
89+
area,
90+
&self.theme,
91+
self.branch_names.len(),
92+
self.scroll_top.get(),
93+
);
8794
}
8895

8996
Ok(())

0 commit comments

Comments
 (0)