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

@ -9,6 +9,7 @@ use cosmic::{
futures::{self, SinkExt},
keyboard::{Event as KeyEvent, Key, Modifiers},
subscription::{self, Subscription},
widget::scrollable,
window, Alignment, Event, Length,
},
style, theme,
@ -1065,6 +1066,9 @@ impl Application for App {
}
}
}
tab::Command::Scroll(id, offset) => {
commands.push(scrollable::scroll_to(id, offset));
}
}
}
return Command::batch(commands);