Add light syntax highligher to libcosmic example

This commit is contained in:
0hypercube 2023-06-25 11:58:10 +01:00
parent e8b10fd675
commit bc1a327371
2 changed files with 20 additions and 0 deletions

View file

@ -268,6 +268,13 @@ impl Application for Window {
));
let mut editor = self.editor.lock().unwrap();
// Update the syntax color theme
match theme {
"Light" => editor.update_theme("base16-ocean.light"),
"Dark" | _ => editor.update_theme("base16-eighties.dark"),
};
update_attrs(&mut *editor, self.attrs);
}
}