app: simplify Damus::new constructor

Just take an egui::Context instead of an eframe::CreationContext.
This should make it easier to test the app via egui::Context::default();

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2024-11-13 10:12:58 -08:00
parent fab1257f6e
commit 2f20e8253e
4 changed files with 12 additions and 14 deletions

View File

@@ -43,7 +43,7 @@ impl PreviewRunner {
native_options,
Box::new(move |cc| {
let app = Into::<PreviewApp>::into(preview);
setup_cc(cc, is_mobile, light_mode);
setup_cc(&cc.egui_ctx, is_mobile, light_mode);
Ok(Box::new(app))
}),
);