Add light syntax highligher to libcosmic example
This commit is contained in:
parent
e8b10fd675
commit
bc1a327371
2 changed files with 20 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue