From 3d1db8e26f7a238b98d6ec551f38ffad5a88ffff Mon Sep 17 00:00:00 2001 From: lucasmerlin Date: Mon, 30 Dec 2024 12:43:53 +0100 Subject: [PATCH] Apply suggestions from emilk Co-authored-by: Emil Ernerfeldt --- crates/egui/src/widgets/image.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/crates/egui/src/widgets/image.rs b/crates/egui/src/widgets/image.rs index 5936a240000..d08b6e1264e 100644 --- a/crates/egui/src/widgets/image.rs +++ b/crates/egui/src/widgets/image.rs @@ -643,21 +643,13 @@ pub fn paint_texture_load_result( job.append( "⚠", 0.0, - TextFormat { - color: ui.visuals().error_fg_color, - font_id: font_id.clone(), - ..Default::default() - }, + TextFormat::simple(font_id.clone(), ui.visuals().error_fg_color), ); if let Some(alt) = alt { job.append( alt, ui.spacing().item_spacing.x, - TextFormat { - color: ui.visuals().text_color(), - font_id, - ..Default::default() - }, + TextFormat::simple(font_id, ui.visuals().text_color()), ); } let galley = ui.painter().layout_job(job);