From f389df212b3e68fd040f4cb05c0b8e8d3cd4790b Mon Sep 17 00:00:00 2001 From: Finn Bear <finnbearlabs@gmail.com> Date: Tue, 26 Apr 2022 22:43:34 -0700 Subject: [PATCH] Cleanup. --- src/component/code.rs | 4 ++-- src/main.rs | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/component/code.rs b/src/component/code.rs index f7d7e2d..2202d1b 100644 --- a/src/component/code.rs +++ b/src/component/code.rs @@ -44,7 +44,7 @@ impl Code { .show(ctx, |ui| { //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 layout_job = egui_demo_lib::syntax_highlighting::highlight( @@ -58,7 +58,7 @@ impl Code { }; egui::TextEdit::multiline(&mut self.code.as_str()) - .font(egui::TextStyle::Monospace) // for cursor height + .font(egui::TextStyle::Monospace) // Only affects cursor. .code_editor() //.desired_rows(10) .lock_focus(true) diff --git a/src/main.rs b/src/main.rs index 15b1b05..8dd7e1c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -91,10 +91,12 @@ impl epi::App for Cartoon { let small_style = style.text_styles.get_mut(&TextStyle::Small).unwrap(); small_style.size = 22.0; } + /* { let monospaced_style = style.text_styles.get_mut(&TextStyle::Monospace).unwrap(); monospaced_style.size = 22.0; } + */ ctx.set_style(style); } -- GitLab