mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 22:30:03 -04:00
Remove some uses of top-level panels in our examples (#7729)
We're phasing out top-level panels (panels that use `Context` directly, instead of being inside another `Ui`). As a first step, stop using them in our demo library and application. * Part of https://github.com/emilk/egui/issues/3524
This commit is contained in:
@@ -74,7 +74,9 @@ fn test_egui_e2e() {
|
||||
const NUM_FRAMES: usize = 5;
|
||||
for _ in 0..NUM_FRAMES {
|
||||
let full_output = ctx.run(raw_input.clone(), |ctx| {
|
||||
demo_windows.ui(ctx);
|
||||
egui::CentralPanel::default().show(ctx, |ui| {
|
||||
demo_windows.ui(ui);
|
||||
});
|
||||
});
|
||||
let clipped_primitives = ctx.tessellate(full_output.shapes, full_output.pixels_per_point);
|
||||
assert!(!clipped_primitives.is_empty());
|
||||
@@ -93,7 +95,9 @@ fn test_egui_zero_window_size() {
|
||||
const NUM_FRAMES: usize = 5;
|
||||
for _ in 0..NUM_FRAMES {
|
||||
let full_output = ctx.run(raw_input.clone(), |ctx| {
|
||||
demo_windows.ui(ctx);
|
||||
egui::CentralPanel::default().show(ctx, |ui| {
|
||||
demo_windows.ui(ui);
|
||||
});
|
||||
});
|
||||
let clipped_primitives = ctx.tessellate(full_output.shapes, full_output.pixels_per_point);
|
||||
assert!(
|
||||
|
||||
Reference in New Issue
Block a user