From 8a2470b45edc6bc6db2f776e62b90e77bae0620c Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sat, 30 Apr 2022 15:47:55 +0200 Subject: [PATCH] example hello_world: remove frame.set_window_size it doesn't work very well --- examples/hello_world/src/main.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/hello_world/src/main.rs b/examples/hello_world/src/main.rs index 626af5ba..1936b8aa 100644 --- a/examples/hello_world/src/main.rs +++ b/examples/hello_world/src/main.rs @@ -26,7 +26,7 @@ impl Default for MyApp { } impl eframe::App for MyApp { - fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) { + fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { egui::CentralPanel::default().show(ctx, |ui| { ui.heading("My egui Application"); ui.horizontal(|ui| { @@ -39,8 +39,5 @@ impl eframe::App for MyApp { } ui.label(format!("Hello '{}', age {}", self.name, self.age)); }); - - // Resize the native window to be just the size we need it to be: - frame.set_window_size(ctx.used_size()); } }