deletion of lines affecting popup scrolling (#2497)

imgbot
Alexis Kalabura 3 years ago committed by GitHub
parent 8493b5fca6
commit 301ed9b48f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -88,8 +88,6 @@ impl<T: Component> Popup<T> {
pub fn scroll(&mut self, offset: usize, direction: bool) { pub fn scroll(&mut self, offset: usize, direction: bool) {
if direction { if direction {
self.scroll += offset;
let max_offset = self.child_size.1.saturating_sub(self.size.1); let max_offset = self.child_size.1.saturating_sub(self.size.1);
self.scroll = (self.scroll + offset).min(max_offset as usize); self.scroll = (self.scroll + offset).min(max_offset as usize);
} else { } else {

Loading…
Cancel
Save