mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 23:00:04 -04:00
Add syntax highlighing feature to egui_extras (#3333)
* Add syntax highlighing feature to egui_extras Enable "syntect" feature for great syntax highlighting of any language. If not a simple fallback is used that works fine for C++, Rust, Python * Check --no-default-features of egui_extras on CI * spelling * Fix building egui_extras without additional features
This commit is contained in:
@@ -45,7 +45,6 @@ impl super::View for About {
|
||||
}
|
||||
|
||||
fn about_immediate_mode(ui: &mut egui::Ui) {
|
||||
use crate::syntax_highlighting::code_view_ui;
|
||||
ui.style_mut().spacing.interact_size.y = 0.0; // hack to make `horizontal_wrapped` work better with text.
|
||||
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
@@ -56,7 +55,7 @@ fn about_immediate_mode(ui: &mut egui::Ui) {
|
||||
});
|
||||
|
||||
ui.add_space(8.0);
|
||||
code_view_ui(
|
||||
crate::rust_view_ui(
|
||||
ui,
|
||||
r#"
|
||||
if ui.button("Save").clicked() {
|
||||
|
||||
Reference in New Issue
Block a user