mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-22 05:12:27 +00:00
apply changes proposed by adam
Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
This commit is contained in:
parent
743b22b3c4
commit
5cac3086fc
|
@ -188,7 +188,7 @@ impl FloatingText {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn scroll_down(&mut self) {
|
fn scroll_down(&mut self) {
|
||||||
let visible_lines = self.get_visible_lines();
|
let visible_lines = self.frame_height.saturating_sub(2);
|
||||||
if self.v_scroll + visible_lines < self.src.len() {
|
if self.v_scroll + visible_lines < self.src.len() {
|
||||||
self.v_scroll += 1;
|
self.v_scroll += 1;
|
||||||
}
|
}
|
||||||
|
@ -211,10 +211,6 @@ impl FloatingText {
|
||||||
self.h_scroll += 1;
|
self.h_scroll += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_visible_lines(&self) -> usize {
|
|
||||||
self.frame_height.saturating_sub(2)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FloatContent for FloatingText {
|
impl FloatContent for FloatingText {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user