mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-23 17:35:00 +00:00
Add a background to the scrollbar
Currently use the pipe character: |
This commit is contained in:
parent
0b159d6bf1
commit
7545d7170c
@ -115,11 +115,12 @@ impl ScrollBase {
|
|||||||
// Now
|
// Now
|
||||||
let start = steps * self.start_line / (1 + self.content_height - self.view_height);
|
let start = steps * self.start_line / (1 + self.content_height - self.view_height);
|
||||||
|
|
||||||
printer.with_color(
|
let color = if printer.focused { color::HIGHLIGHT } else { color::HIGHLIGHT_INACTIVE };
|
||||||
if printer.focused { color::HIGHLIGHT } else { color::HIGHLIGHT_INACTIVE },
|
|
||||||
|printer| {
|
printer.print_vline((printer.size.x-1,0), printer.size.y, '|' as u64);
|
||||||
printer.print_vline((printer.size.x-1, start), height, ' ' as u64);
|
printer.with_color(color, |printer| {
|
||||||
});
|
printer.print_vline((printer.size.x-1, start), height, ' ' as u64);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user