mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
example hello_world: remove frame.set_window_size
it doesn't work very well
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user