1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 21:30:03 -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:
aspect
2023-09-17 14:25:50 +03:00
committed by GitHub
parent d949eaf682
commit 9c4f55b1f4
2 changed files with 6 additions and 7 deletions

View File

@@ -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"));