From a17aa67267cee02b816f61f0ed9fb1b0e4d30ef2 Mon Sep 17 00:00:00 2001 From: adrien <221212@umons.ac.be> Date: Mon, 10 Nov 2025 17:39:33 +0100 Subject: [PATCH] cleanup --- .../tests/snapshots/combobox_opened.png | 4 +- .../tests/snapshots/menu/closed_hovered.png | 4 +- .../tests/snapshots/menu/opened.png | 2 +- .../tests/snapshots/menu/submenu.png | 4 +- .../tests/snapshots/menu/subsubmenu.png | 4 +- .../override_text_color_interactive.png | 4 +- .../tests/snapshots/readme_example.png | 4 +- .../snapshots/should_wait_for_images.png | 4 +- .../tests/snapshots/test_shrink.png | 4 +- .../tests/snapshots/test_tooltip_hidden.png | 4 +- .../tests/snapshots/test_tooltip_shown.png | 4 +- examples/hello_world_simple/questions.md | 19 -------- examples/hello_world_simple/src/main.rs | 46 ------------------- 13 files changed, 21 insertions(+), 86 deletions(-) delete mode 100644 examples/hello_world_simple/questions.md diff --git a/crates/egui_kittest/tests/snapshots/combobox_opened.png b/crates/egui_kittest/tests/snapshots/combobox_opened.png index b64baffec..aaa7198ce 100644 --- a/crates/egui_kittest/tests/snapshots/combobox_opened.png +++ b/crates/egui_kittest/tests/snapshots/combobox_opened.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ec3b264d0243f950babd8eb943efcaa2d40b0fa586cf391ab6ff28e56f1318bb -size 7623 +oid sha256:8f70ef032c241cd63675a246de07886c5c822e6fe21525b3a6d3fee106a589c9 +size 7501 diff --git a/crates/egui_kittest/tests/snapshots/menu/closed_hovered.png b/crates/egui_kittest/tests/snapshots/menu/closed_hovered.png index 5d46f1f0f..d2969adee 100644 --- a/crates/egui_kittest/tests/snapshots/menu/closed_hovered.png +++ b/crates/egui_kittest/tests/snapshots/menu/closed_hovered.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:73b09338bca2da64869595df0a8f990e9091ea0bde15820c572d343b4d1c4bb5 -size 10807 +oid sha256:dd6e159a462dde10240c4ca51da5ca5badfb7fc170bad97a59106babb72f8ae3 +size 10795 diff --git a/crates/egui_kittest/tests/snapshots/menu/opened.png b/crates/egui_kittest/tests/snapshots/menu/opened.png index c4bf4e70d..30f26b446 100644 --- a/crates/egui_kittest/tests/snapshots/menu/opened.png +++ b/crates/egui_kittest/tests/snapshots/menu/opened.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:58a58e1db828dbcb2a770c6add716950edcd359c911f3348613ffd8bb7dbeaa2 +oid sha256:8f2a5873350f85457d599c1fd165ac756ed69758e7647e160c64f44d2f35c804 size 21812 diff --git a/crates/egui_kittest/tests/snapshots/menu/submenu.png b/crates/egui_kittest/tests/snapshots/menu/submenu.png index e6e8fdb6f..96ffaf97c 100644 --- a/crates/egui_kittest/tests/snapshots/menu/submenu.png +++ b/crates/egui_kittest/tests/snapshots/menu/submenu.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f9786fbc273adeb88a79d4917d8b3da742604644a78b122b7c1307006ac3c581 -size 29252 +oid sha256:facc05c499745594ac286f15645e40447633a176058337cad9edcb850ad578c7 +size 29379 diff --git a/crates/egui_kittest/tests/snapshots/menu/subsubmenu.png b/crates/egui_kittest/tests/snapshots/menu/subsubmenu.png index 1a254947d..d1d0b4cd3 100644 --- a/crates/egui_kittest/tests/snapshots/menu/subsubmenu.png +++ b/crates/egui_kittest/tests/snapshots/menu/subsubmenu.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:acdf4b04a4a69b69a255187f7a82e566860d278c5982a34166b3ed2c9435766a -size 34061 +oid sha256:9f23ff8c6782befdbe7bd5f076dcdda15c38555f8e505282369bf52e43938c1b +size 34194 diff --git a/crates/egui_kittest/tests/snapshots/override_text_color_interactive.png b/crates/egui_kittest/tests/snapshots/override_text_color_interactive.png index 6d30bd5ee..6e92f9f03 100644 --- a/crates/egui_kittest/tests/snapshots/override_text_color_interactive.png +++ b/crates/egui_kittest/tests/snapshots/override_text_color_interactive.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a525d62b50978bfa059f043f502ddf0ea4f8f88b2ec09cf7e07c53a7bf09e763 -size 19969 +oid sha256:2fa5cb5b96232d729f89be8cc92263715fe7197e72343b71e57e53a359afe181 +size 19881 diff --git a/crates/egui_kittest/tests/snapshots/readme_example.png b/crates/egui_kittest/tests/snapshots/readme_example.png index 399005939..2c8565718 100644 --- a/crates/egui_kittest/tests/snapshots/readme_example.png +++ b/crates/egui_kittest/tests/snapshots/readme_example.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:18fbcc76f0df799331760e06487d6467aa2f575ac14d31d1859bf6ba3dba2941 -size 2199 +oid sha256:bb8d702361987803995c0f557ce94552a87b97dcd25bed5ee39af4c0e6090700 +size 1904 diff --git a/crates/egui_kittest/tests/snapshots/should_wait_for_images.png b/crates/egui_kittest/tests/snapshots/should_wait_for_images.png index 7e33877fc..25ae1c39c 100644 --- a/crates/egui_kittest/tests/snapshots/should_wait_for_images.png +++ b/crates/egui_kittest/tests/snapshots/should_wait_for_images.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f038c7fdf31f35107ec6e29edc0895049160ccbe98d1577c16ae082605b58d52 -size 2207 +oid sha256:e145d6abdcdcbad1f9ed58f3b50a1c697ee2bff481279640d9ee449f5f2a51dd +size 2820 diff --git a/crates/egui_kittest/tests/snapshots/test_shrink.png b/crates/egui_kittest/tests/snapshots/test_shrink.png index 9155bb6e7..c25ae0367 100644 --- a/crates/egui_kittest/tests/snapshots/test_shrink.png +++ b/crates/egui_kittest/tests/snapshots/test_shrink.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:08da2ac5bfb1e5ef7fb97cdc792bbf0529c20276312f0c444b122af02990e78b -size 3004 +oid sha256:025942c144891b8862bf931385824e0484e60f4e7766f5d4401511c72ff20756 +size 2975 diff --git a/crates/egui_kittest/tests/snapshots/test_tooltip_hidden.png b/crates/egui_kittest/tests/snapshots/test_tooltip_hidden.png index 9155bb6e7..c25ae0367 100644 --- a/crates/egui_kittest/tests/snapshots/test_tooltip_hidden.png +++ b/crates/egui_kittest/tests/snapshots/test_tooltip_hidden.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:08da2ac5bfb1e5ef7fb97cdc792bbf0529c20276312f0c444b122af02990e78b -size 3004 +oid sha256:025942c144891b8862bf931385824e0484e60f4e7766f5d4401511c72ff20756 +size 2975 diff --git a/crates/egui_kittest/tests/snapshots/test_tooltip_shown.png b/crates/egui_kittest/tests/snapshots/test_tooltip_shown.png index 1c6358ad5..8ff6bba67 100644 --- a/crates/egui_kittest/tests/snapshots/test_tooltip_shown.png +++ b/crates/egui_kittest/tests/snapshots/test_tooltip_shown.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b902df1b5971cd8d54a2e345f293bca2bf6f5ad262812ef8535f4191375e9dd2 -size 4486 +oid sha256:c267530452adb4f1ed1440df476d576ef4c2d96e6c58068bb57fed4615f5e113 +size 4453 diff --git a/examples/hello_world_simple/questions.md b/examples/hello_world_simple/questions.md deleted file mode 100644 index 85e5d713f..000000000 --- a/examples/hello_world_simple/questions.md +++ /dev/null @@ -1,19 +0,0 @@ -## General - -- Interact size is great, but it SHOULD or MUST be at least this size ? Maybe add a parameter for this choice ? - -## Button - -- If hovering a button add a stroke, the ui shift. Maybe add the option to avoid this resize by making the frame smaller ? - -## Label - -- I understand checking if a sense has been set by the user, but why check if it's different than hover ? Is it for technical purpose or purely to avoid confusion with a link ? - -- Selecting the text while being underlined move the underline - -## Checkbox - -- Checkbox are in fact a label and a check box. To propagate the CheckBoxStyle to the label we need to use a scope or something similar and change the global style. Why bind label to the check box, the user can add it himself (To keep the great prototyping speed we could keep this behavior in a Ui method, that would just merge) - -- Propose different type of checkmark ? (eg. small square, dot, filled, custom, etc) diff --git a/examples/hello_world_simple/src/main.rs b/examples/hello_world_simple/src/main.rs index d3a3ad0fc..4fe49a89d 100644 --- a/examples/hello_world_simple/src/main.rs +++ b/examples/hello_world_simple/src/main.rs @@ -28,52 +28,6 @@ fn main() -> eframe::Result { age += 1; } ui.label(format!("Hello '{name}', age {age}")); - - egui::MenuBar::new().ui(ui, |ui| { - ui.menu_button("File", |ui| { - if ui.button("Quit").clicked() { - ui.ctx().send_viewport_cmd(egui::ViewportCommand::Close); - } - if ui.button("Quit").clicked() { - ui.ctx().send_viewport_cmd(egui::ViewportCommand::Close); - } - if ui.button("Quit").clicked() { - ui.ctx().send_viewport_cmd(egui::ViewportCommand::Close); - } - }); - ui.menu_button("test", |ui| { - if ui.button("Quit").clicked() { - ui.ctx().send_viewport_cmd(egui::ViewportCommand::Close); - } - if ui.button("Quit").clicked() { - ui.ctx().send_viewport_cmd(egui::ViewportCommand::Close); - } - if ui.button("Quit").clicked() { - ui.ctx().send_viewport_cmd(egui::ViewportCommand::Close); - } - }); - ui.menu_button("azea", |ui| { - if ui.button("Quit").clicked() { - ui.ctx().send_viewport_cmd(egui::ViewportCommand::Close); - } - ui.menu_button("test", |ui| { - if ui.button("Quit").clicked() { - ui.ctx().send_viewport_cmd(egui::ViewportCommand::Close); - } - if ui.button("Quit").clicked() { - ui.ctx().send_viewport_cmd(egui::ViewportCommand::Close); - } - if ui.button("Quit").clicked() { - ui.ctx().send_viewport_cmd(egui::ViewportCommand::Close); - } - }); - }); - ui.menu_button("vrzzzde", |ui| { - if ui.button("Quit").clicked() { - ui.ctx().send_viewport_cmd(egui::ViewportCommand::Close); - } - }); - }); }); }) }