mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 14:50:03 -04:00
More even text kerning (#7431)
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
@@ -238,7 +238,7 @@ impl ColoredText {
|
||||
pub fn ui(&self, ui: &mut egui::Ui) {
|
||||
let mut job = self.0.clone();
|
||||
job.wrap.max_width = ui.available_width();
|
||||
let galley = ui.fonts(|f| f.layout_job(job));
|
||||
let galley = ui.fonts_mut(|f| f.layout_job(job));
|
||||
ui.add(egui::Label::new(galley).selectable(true));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ impl FrameHistory {
|
||||
));
|
||||
let cpu_usage = to_screen.inverse().transform_pos(pointer_pos).y;
|
||||
let text = format!("{:.1} ms", 1e3 * cpu_usage);
|
||||
shapes.push(ui.fonts(|f| {
|
||||
shapes.push(ui.fonts_mut(|f| {
|
||||
Shape::text(
|
||||
f,
|
||||
pos2(rect.left(), y),
|
||||
|
||||
Reference in New Issue
Block a user