diff --git a/src/component/code.rs b/src/component/code.rs index f7d7e2d163473101b6d25f2c74e296a6c95e3253..2202d1bd3b431b30d84cc394c0f4271b57681acb 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 15b1b05cc2adebf63f638d1903b4319eabc991be..8dd7e1cbbbb34fb10e21f74080b495a9ca669441 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); }