Adjust scroll when using arrow keys

This commit is contained in:
Jeremy Soller 2024-02-29 16:25:54 -07:00
parent 08a7f6faed
commit 501e4f48eb
No known key found for this signature in database
GPG key ID: D02FD439211AF56F
3 changed files with 69 additions and 4 deletions

View file

@ -10,6 +10,7 @@ use cosmic::{
keyboard::{Event as KeyEvent, Modifiers},
multi_window::Application as IcedApplication,
subscription::{self, Subscription},
widget::scrollable,
window, Event, Length, Size,
},
theme,
@ -592,6 +593,9 @@ impl Application for App {
commands.push(self.update(Message::Open));
}
}
tab::Command::Scroll(id, offset) => {
commands.push(scrollable::scroll_to(id, offset));
}
}
}
return Command::batch(commands);