diff --git a/crates/egui/src/widgets/plot/axis.rs b/crates/egui/src/widgets/plot/axis.rs index 84d150263..8702f2688 100644 --- a/crates/egui/src/widgets/plot/axis.rs +++ b/crates/egui/src/widgets/plot/axis.rs @@ -187,7 +187,7 @@ impl Widget for AxisWidget { let galley = text.into_galley(ui, Some(false), f32::INFINITY, TextStyle::Body); let text_color = visuals .override_text_color - .unwrap_or(ui.visuals().text_color()); + .unwrap_or_else(|| ui.visuals().text_color()); let angle: f32 = match AXIS { X_AXIS => 0.0, Y_AXIS => -std::f32::consts::PI * 0.5,