-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix: CodeTheme functions - ui and add builder #7684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Preview available at https://egui-pr-preview.github.io/pr/7684-fix-code-theme-functions View snapshot changes at kitdiff |
|
Note that the potential other option is to remove the CodeTheme |
|
This MR also add methods to easily change the font and font size |
emilk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
| .lock_focus(true) | ||
| .desired_width(f32::INFINITY) | ||
| .layouter(&mut layouter); | ||
| let editor = if !cfg!(feature = "syntect") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please swap the if/else branches to avoid the extra !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, fixed
Thanks
Following this MR #7375
Without Syntect, the urrent theme selector is
global_theme_preference_buttons. It should be the dark_theme variable of the local CodeTheme - same as syntectTested with
cargo run # and cargo run --features syntectthanks for this amazing library!