Add a background to the scrollbar

Currently use the pipe character: |
This commit is contained in:
Alexandre Bury 2015-06-02 17:44:31 -07:00
parent 0b159d6bf1
commit 7545d7170c

View File

@ -115,9 +115,10 @@ 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.with_color(color, |printer| {
printer.print_vline((printer.size.x-1, start), height, ' ' as u64); printer.print_vline((printer.size.x-1, start), height, ' ' as u64);
}); });
} }