Rename "bot" to "bottom" in WindowDrawCommand::Scroll (#789)

* chore(test): Fix function call

* refactor(WindowDrawCommand::Scroll): Rename bot to bottom
macos-click-through
partizan 4 years ago committed by GitHub
parent d564dc8261
commit d2e33b87f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -25,7 +25,7 @@ pub enum WindowDrawCommand {
},
Scroll {
top: u64,
bot: u64,
bottom: u64,
left: u64,
right: u64,
rows: i64,
@ -256,21 +256,21 @@ impl Window {
pub fn scroll_region(
&mut self,
top: u64,
bot: u64,
bottom: u64,
left: u64,
right: u64,
rows: i64,
cols: i64,
) {
let y_iter: Box<dyn Iterator<Item = i64>> = if rows > 0 {
Box::new((top as i64 + rows)..bot as i64)
Box::new((top as i64 + rows)..bottom as i64)
} else {
Box::new((top as i64..(bot as i64 + rows)).rev())
Box::new((top as i64..(bottom as i64 + rows)).rev())
};
self.send_command(WindowDrawCommand::Scroll {
top,
bot,
bottom,
left,
right,
rows,

@ -374,7 +374,7 @@ impl RenderedWindow {
}
WindowDrawCommand::Scroll {
top,
bot,
bottom,
left,
right,
rows,
@ -384,7 +384,7 @@ impl RenderedWindow {
(left * renderer.font_width) as f32 * scaling,
(top * renderer.font_height) as f32 * scaling,
(right * renderer.font_width) as f32 * scaling,
(bot * renderer.font_height) as f32 * scaling,
(bottom * renderer.font_height) as f32 * scaling,
);
let mut translated_region = scrolled_region;

Loading…
Cancel
Save