mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-23 17:35:00 +00:00
Fix show_scrollbars
This commit is contained in:
parent
86c800554b
commit
cfcdfa7e9e
@ -101,6 +101,11 @@ impl Core {
|
|||||||
printer: &Printer<'a, 'b>,
|
printer: &Printer<'a, 'b>,
|
||||||
) -> Printer<'a, 'b> {
|
) -> Printer<'a, 'b> {
|
||||||
// Draw scrollbar?
|
// Draw scrollbar?
|
||||||
|
|
||||||
|
let size = self.available_size();
|
||||||
|
|
||||||
|
// Draw the scrollbars
|
||||||
|
if self.get_show_scrollbars() {
|
||||||
let scrolling = self.is_scrolling();
|
let scrolling = self.is_scrolling();
|
||||||
|
|
||||||
let lengths = self.scrollbar_thumb_lengths();
|
let lengths = self.scrollbar_thumb_lengths();
|
||||||
@ -114,10 +119,8 @@ impl Core {
|
|||||||
ColorStyle::highlight_inactive()
|
ColorStyle::highlight_inactive()
|
||||||
};
|
};
|
||||||
|
|
||||||
let size = self.available_size();
|
XY::zip5(lengths, offsets, size, line_c, Orientation::pair())
|
||||||
|
.run_if(
|
||||||
// Draw the scrollbars
|
|
||||||
XY::zip5(lengths, offsets, size, line_c, Orientation::pair()).run_if(
|
|
||||||
scrolling,
|
scrolling,
|
||||||
|(length, offset, size, c, orientation)| {
|
|(length, offset, size, c, orientation)| {
|
||||||
let start = printer
|
let start = printer
|
||||||
@ -152,6 +155,7 @@ impl Core {
|
|||||||
if scrolling.both() {
|
if scrolling.both() {
|
||||||
printer.print(printer.size.saturating_sub((1, 1)), "╳");
|
printer.print(printer.size.saturating_sub((1, 1)), "╳");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Draw content
|
// Draw content
|
||||||
printer
|
printer
|
||||||
|
Loading…
Reference in New Issue
Block a user