Skip to content
Snippets Groups Projects
Commit f389df21 authored by Finn Bear's avatar Finn Bear
Browse files

Cleanup.

parent 4fc9b16b
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,7 @@ impl Code { ...@@ -44,7 +44,7 @@ impl Code {
.show(ctx, |ui| { .show(ctx, |ui| {
//let (_id, _rect) = ui.allocate_space(Vec2::splat(self.size_pixels)); //let (_id, _rect) = ui.allocate_space(Vec2::splat(self.size_pixels));
let theme = egui_demo_lib::syntax_highlighting::CodeTheme::from_memory(ui.ctx()); let theme = egui_demo_lib::syntax_highlighting::CodeTheme::light();
let mut layouter = |ui: &egui::Ui, string: &str, wrap_width: f32| { let mut layouter = |ui: &egui::Ui, string: &str, wrap_width: f32| {
let mut layout_job = egui_demo_lib::syntax_highlighting::highlight( let mut layout_job = egui_demo_lib::syntax_highlighting::highlight(
...@@ -58,7 +58,7 @@ impl Code { ...@@ -58,7 +58,7 @@ impl Code {
}; };
egui::TextEdit::multiline(&mut self.code.as_str()) egui::TextEdit::multiline(&mut self.code.as_str())
.font(egui::TextStyle::Monospace) // for cursor height .font(egui::TextStyle::Monospace) // Only affects cursor.
.code_editor() .code_editor()
//.desired_rows(10) //.desired_rows(10)
.lock_focus(true) .lock_focus(true)
......
...@@ -91,10 +91,12 @@ impl epi::App for Cartoon { ...@@ -91,10 +91,12 @@ impl epi::App for Cartoon {
let small_style = style.text_styles.get_mut(&TextStyle::Small).unwrap(); let small_style = style.text_styles.get_mut(&TextStyle::Small).unwrap();
small_style.size = 22.0; small_style.size = 22.0;
} }
/*
{ {
let monospaced_style = style.text_styles.get_mut(&TextStyle::Monospace).unwrap(); let monospaced_style = style.text_styles.get_mut(&TextStyle::Monospace).unwrap();
monospaced_style.size = 22.0; monospaced_style.size = 22.0;
} }
*/
ctx.set_style(style); ctx.set_style(style);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment