From 3f71c1625d8ca354c219178e142c1b84f807fa44 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 5936a240000a..b5fa30cb9315 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);