diff --git a/crates/egui/src/widgets/button.rs b/crates/egui/src/widgets/button.rs index bc411910b143..088800e45ceb 100644 --- a/crates/egui/src/widgets/button.rs +++ b/crates/egui/src/widgets/button.rs @@ -290,8 +290,7 @@ impl Widget for Button<'_> { }); if ui.is_rect_visible(rect) { - let style = ui.style().clone(); - let visuals = style.interact(&response); + let visuals = ui.style().interact(&response); let (frame_expansion, frame_rounding, frame_fill, frame_stroke) = if selected { let selection = ui.visuals().selection; diff --git a/crates/egui/src/widgets/image.rs b/crates/egui/src/widgets/image.rs index cb18752f595e..4e49714d62cd 100644 --- a/crates/egui/src/widgets/image.rs +++ b/crates/egui/src/widgets/image.rs @@ -8,7 +8,7 @@ use epaint::{ use crate::{ load::{Bytes, SizeHint, SizedTexture, TextureLoadResult, TexturePoll}, - pos2, Align2, Color32, Context, Id, Mesh, Painter, Rect, Response, Rounding, Sense, Shape, + pos2, Color32, Context, Id, Mesh, Painter, Rect, Response, Rounding, Sense, Shape, Spinner, Stroke, TextStyle, TextureOptions, Ui, Vec2, Widget, WidgetInfo, WidgetType, }; @@ -357,7 +357,7 @@ impl<'a> Image<'a> { /// # }); /// ``` #[inline] - pub fn paint_at(&self, ui: &mut Ui, rect: Rect) { + pub fn paint_at(&self, ui: &Ui, rect: Rect) { paint_texture_load_result( ui, &self.load_for_size(ui.ctx(), rect.size()), @@ -614,7 +614,7 @@ impl<'a> ImageSource<'a> { } pub fn paint_texture_load_result( - ui: &mut Ui, + ui: &Ui, tlr: &TextureLoadResult, rect: Rect, show_loading_spinner: Option,