1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 22:30:03 -04:00

[epaint] Add more text wrapping options (#1291)

This commit is contained in:
awaken1ng
2022-04-04 01:28:47 +07:00
committed by GitHub
parent d09fa63d9c
commit 901b7c7994
11 changed files with 256 additions and 57 deletions

View File

@@ -7,7 +7,7 @@ pub fn code_view_ui(ui: &mut egui::Ui, mut code: &str) {
let mut layouter = |ui: &egui::Ui, string: &str, _wrap_width: f32| {
let layout_job = highlight(ui.ctx(), &theme, string, language);
// layout_job.wrap_width = wrap_width; // no wrapping
// layout_job.wrap.max_width = wrap_width; // no wrapping
ui.fonts().layout_job(layout_job)
};