1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-03 15:20:05 -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

@@ -85,7 +85,7 @@ impl EasyMarkEditor {
let response = if self.highlight_editor {
let mut layouter = |ui: &egui::Ui, easymark: &str, wrap_width: f32| {
let mut layout_job = highlighter.highlight(ui.style(), easymark);
layout_job.wrap_width = wrap_width;
layout_job.wrap.max_width = wrap_width;
ui.fonts().layout_job(layout_job)
};