chore: update libcosmic

This commit is contained in:
Ashley Wulber 2024-02-05 16:18:36 -05:00
parent 1a7b210b70
commit 0a5325ba05
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
6 changed files with 491 additions and 504 deletions

View file

@ -295,7 +295,7 @@ pub enum Message {
FindReplaceValueChanged(String),
FindSearchValueChanged(String),
GitProjectStatus(Vec<(String, PathBuf, Vec<GitStatus>)>),
Key(Modifiers, keyboard::KeyCode),
Key(Modifiers, keyboard::Key),
Modifiers(Modifiers),
NewFile,
NewWindow,
@ -1389,9 +1389,9 @@ impl Application for App {
Message::GitProjectStatus(project_status) => {
self.git_project_status = Some(project_status);
}
Message::Key(modifiers, key_code) => {
Message::Key(modifiers, key) => {
for (key_bind, action) in self.key_binds.iter() {
if key_bind.matches(modifiers, key_code) {
if key_bind.matches(modifiers, key.clone()) {
return self.update(action.message());
}
}
@ -2173,10 +2173,9 @@ impl Application for App {
subscription::Subscription::batch([
event::listen_with(|event, _status| match event {
event::Event::Keyboard(keyboard::Event::KeyPressed {
modifiers,
key_code,
}) => Some(Message::Key(modifiers, key_code)),
event::Event::Keyboard(keyboard::Event::KeyPressed { modifiers, key, .. }) => {
Some(Message::Key(modifiers, key))
}
event::Event::Keyboard(keyboard::Event::ModifiersChanged(modifiers)) => {
Some(Message::Modifiers(modifiers))
}