mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Remove Function() invocation from eframe text_agent to bypass "unsafe-eval" restrictions in Chrome browser extensions. (#3349)
* remove Function (eval) from eframe text agent for compatibility with browser extensions. * cargo fmt on image viewer
This commit is contained in:
@@ -167,7 +167,7 @@ impl eframe::App for ImageViewer {
|
||||
if !matches!(self.fit, ImageFit::Original { .. }) {
|
||||
self.fit = ImageFit::Original { scale: 1.0 };
|
||||
}
|
||||
let ImageFit::Original{scale} = &mut self.fit else {
|
||||
let ImageFit::Original { scale } = &mut self.fit else {
|
||||
unreachable!()
|
||||
};
|
||||
ui.add(Slider::new(scale, 0.1..=4.0).text("scale"));
|
||||
|
||||
Reference in New Issue
Block a user