1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 14:50:03 -04:00

Deprecate CentralPanel::show (#7783)

* Part of https://github.com/emilk/egui/issues/3524

Use `show_inside` instead, with a `Ui` instead of a `Context`
This commit is contained in:
Emil Ernerfeldt
2025-12-17 16:39:13 +01:00
committed by GitHub
parent 53ec7333c3
commit 6157a35985
5 changed files with 46 additions and 31 deletions

View File

@@ -18,8 +18,8 @@ fn empty_ui_should_return_tree_with_only_root_window() {
assert_eq!(
output.nodes.len(),
4,
"Expected the root node and two Uis and a Frame for the panel"
2,
"Expected the root node and the top level Ui; found: {output:#?}",
);
assert_eq!(
@@ -28,8 +28,8 @@ fn empty_ui_should_return_tree_with_only_root_window() {
.iter()
.filter(|(_, n)| n.role() == Role::GenericContainer)
.count(),
3,
"Expected two Uis and one Frame as GenericContainer nodes.",
1,
"Expected a single Ui as a GenericContainer node.",
);
let (id, root) = &output.nodes[0];