example hello_world: remove frame.set_window_size

it doesn't work very well
This commit is contained in:
Emil Ernerfeldt 2022-04-30 15:47:55 +02:00
parent afd27ca664
commit 8a2470b45e

View file

@ -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());
}
}