mirror of
https://github.com/extrawurst/gitui.git
synced 2024-12-28 03:22:51 +03:00
Add scrollbar in branchlist (#417)
* Add scrollbar in branchlist * Change scrollbar symbol to DOUBLE_VERTICAL
This commit is contained in:
parent
8bf0d78b04
commit
2f3af71408
@ -78,12 +78,20 @@ impl DrawableComponent for SelectBranchComponent {
|
||||
.block(
|
||||
Block::default()
|
||||
.title(strings::SELECT_BRANCH_POPUP_MSG)
|
||||
.borders(Borders::ALL)
|
||||
.border_type(BorderType::Thick),
|
||||
.border_type(BorderType::Thick)
|
||||
.borders(Borders::ALL),
|
||||
)
|
||||
.alignment(Alignment::Left),
|
||||
area,
|
||||
);
|
||||
|
||||
ui::draw_scrollbar(
|
||||
f,
|
||||
area,
|
||||
&self.theme,
|
||||
self.branch_names.len(),
|
||||
self.scroll_top.get(),
|
||||
);
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
@ -5,7 +5,7 @@ use tui::{
|
||||
buffer::Buffer,
|
||||
layout::{Margin, Rect},
|
||||
style::Style,
|
||||
symbols::{block::FULL, line::THICK_VERTICAL},
|
||||
symbols::{block::FULL, line::DOUBLE_VERTICAL},
|
||||
widgets::Widget,
|
||||
Frame,
|
||||
};
|
||||
@ -50,7 +50,7 @@ impl Widget for Scrollbar {
|
||||
}
|
||||
|
||||
for y in area.top()..area.bottom() {
|
||||
buf.set_string(right, y, THICK_VERTICAL, self.style_bar);
|
||||
buf.set_string(right, y, DOUBLE_VERTICAL, self.style_bar);
|
||||
}
|
||||
|
||||
let max_pos = self.lines.saturating_sub(area.height);
|
||||
|
Loading…
Reference in New Issue
Block a user